diff --git a/.gitea/actions/local-ci-build/action.yml b/.gitea/actions/local-ci-build/action.yml index c265624..8564e98 100644 --- a/.gitea/actions/local-ci-build/action.yml +++ b/.gitea/actions/local-ci-build/action.yml @@ -299,12 +299,14 @@ runs: } # Build argument list for the Python CLI. Long-form kebab-case flags only. + # NOTE: never put an empty string in the splatted array — PowerShell + # 5.1 drops zero-length args when calling a native exe, which would + # shift the flag/value pairing. Add optional args conditionally. $pyArgs = @( '-m', 'ci_orchestrator', 'job', '--job-id', $jobId, '--repo-url', $repoUrl, '--branch', $repoBranch, - '--commit', $repoCommit, '--build-command', $env:INPUT_BUILD_COMMAND, '--guest-artifact-source', $env:INPUT_ARTIFACT_SOURCE, '--guest-os', $resolvedGuestOS, @@ -312,6 +314,7 @@ runs: '--template-path', $resolvedTemplatePath, '--snapshot-name', $resolvedSnapshotName ) + if ($repoCommit) { $pyArgs += @('--commit', $repoCommit) } # Submodules and transport default to ON; pass the explicit # negative flag when the caller opted out so the Python default