Skip to content

Fix deploy silent no-op after zx 7→8 upgrade#100

Merged
antonmedv merged 1 commit intomasterfrom
copilot/investigate-issue-99
Apr 8, 2026
Merged

Fix deploy silent no-op after zx 7→8 upgrade#100
antonmedv merged 1 commit intomasterfrom
copilot/investigate-issue-99

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

The v1.0.25 build upgraded zx from v7 to v8, which introduced two breaking behavioral changes that caused deploys to silently succeed without running any tasks.

verbose default flipped to false

zx 8 defaults verbose to false (was true). All command output—stdout and stderr—is captured internally but never printed to the Actions log.

Fix: Set $.verbose = true after import.

quote("") now emits an explicit empty shell argument

zx 7's quote("") returned "" (vanishes in shell). zx 8 returns $'' (explicit empty positional arg). When the optional recipe input is unset, the command becomes:

php vendor/bin/dep deploy stage=uat $'' --no-interaction --ansi -v

That spurious empty argument causes Deployer (v8 especially) to silently no-op.

Fix: Use arrays instead of strings for optional args (recipe, verbosity). Empty arrays produce no arguments in zx template literals:

const recipeArgs: string[] = []
if (recipeInput !== '') {
  recipeArgs.push(`--file=${recipeInput}`)
}
await $`${phpBin} ${bin} ${cmd} ${recipeArgs} --no-interaction ${ansi} ${verbosityArgs} ${options}`

Two breaking changes from the zx 7→8 upgrade caused this regression:

1. zx 8 defaults verbose to false (was true in zx 7), suppressing all
   command output from the Actions log. Fix: set $.verbose = true.

2. zx 8's quote("") returns $'' (explicit empty shell argument) instead
   of "" (which vanished in the command string). When the optional
   recipe input is empty, this passed an unwanted empty argument to
   Deployer, causing it to silently no-op. Fix: use arrays for optional
   args (recipe, verbosity) so empty values produce no arguments.

Agent-Logs-Url: https://github.com/deployphp/action/sessions/9f7b96de-ce5c-4f32-baac-23aa7b69e161

Co-authored-by: antonmedv <141232+antonmedv@users.noreply.github.com>
@antonmedv antonmedv marked this pull request as ready for review April 8, 2026 10:19
@antonmedv antonmedv merged commit a1b46c2 into master Apr 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants