Hive Hive
Sign in

feat(cli): tuist plugin run / plugin test silently prints help instead of executing

GitHub issue · Closed

Metadata
Source
tuist/tuist #10602
Updated
Jun 24, 2026
Domains
CLI
Details

Description

tuist plugin run and tuist plugin test print the parent tuist plugin help page and exit with code 0 instead of actually running or testing the plugin.

Steps to reproduce

  1. Create a minimal plugin:
mkdir -p MyPlugin/Sources/MyPlugin

MyPlugin/Package.swift:

// swift-tools-version: 5.9
import PackageDescription
let package = Package(
name: "MyPlugin",
targets: [
.executableTarget(name: "MyPlugin"),
]
)

MyPlugin/Sources/MyPlugin/main.swift:

print("Plugin executed successfully!")
  1. Run the plugin via tuist:
tuist plugin run --path MyPlugin MyPlugin
  1. Observe: the tuist plugin help page is printed and the command exits without executing the plugin.

Expected behavior

The plugin should be built and executed, printing Plugin executed successfully!.

Actual behavior

The help page for tuist plugin is printed and the process exits with code 0. The plugin code is never invoked.

Root cause

PluginRunCommand and PluginTestCommand conform to ParsableCommand but declare async func run(). Since ParsableCommand only defines the synchronous func run() throws, the async method never satisfies the protocol requirement. In TrackableCommand.run(), the as? AsyncParsableCommand cast fails, so the default ParsableCommand.run() is called, which throws CleanExit.helpRequest.

The fix is to change both structs to conform to AsyncParsableCommand instead.

Affected files

  • cli/Sources/TuistKit/Commands/Plugin/PluginRunCommand.swift
  • cli/Sources/TuistKit/Commands/Plugin/PluginTestCommand.swift

Environment

  • Tuist version: broken since 4.169.1 (introduced in commit 9303ffebd4, PR #10040)
  • Last working version: 4.169.0
  • macOS (any version)

Workaround

Run the plugin’s Swift package directly:

swift run --configuration debug --package-path MyPlugin MyPlugin
Comments
R
rwjc May 5, 2026

Is there a reson why f472d804db1 disabled a ridiculous amount of tests?

TA
tuist-atlas[bot] Jun 3, 2026

The fix for tuist plugin run and tuist plugin test commands is now available in 4.195.14. Update to this version to get the change.