Skip to content

fix(ci): Surface install.ps1 failures in test-install-ps1#143

Merged
misonijnik merged 1 commit into
mainfrom
misonijnik/cli-debug-install-ps1
May 15, 2026
Merged

fix(ci): Surface install.ps1 failures in test-install-ps1#143
misonijnik merged 1 commit into
mainfrom
misonijnik/cli-debug-install-ps1

Conversation

@misonijnik
Copy link
Copy Markdown
Member

The Windows install test captured install.ps1 output into a variable but never printed it, then unconditionally indexed $matches[1]. When install.ps1 failed to emit OPENTAINT_BINARY_PATH (for any reason), the step failed with the cryptic "Cannot index into a null array" instead of the actual install.ps1 error.

  • Echo install.ps1 output before parsing it.
  • Throw on non-zero $LASTEXITCODE from install.ps1.
  • Throw a clear message when the regex match fails.
  • Trim captured path and write via $env:GITHUB_OUTPUT (the deprecated ::set-output workflow command was being used).

The Windows install test captured install.ps1 output into a variable
but never printed it, then unconditionally indexed $matches[1]. When
install.ps1 failed to emit OPENTAINT_BINARY_PATH (for any reason), the
step failed with the cryptic "Cannot index into a null array" instead
of the actual install.ps1 error.

- Echo install.ps1 output before parsing it.
- Throw on non-zero $LASTEXITCODE from install.ps1.
- Throw a clear message when the regex match fails.
- Trim captured path and write via $env:GITHUB_OUTPUT (the deprecated
  ::set-output workflow command was being used).
@misonijnik misonijnik merged commit 93f22a4 into main May 15, 2026
13 checks passed
@misonijnik misonijnik deleted the misonijnik/cli-debug-install-ps1 branch May 15, 2026 01:21
misonijnik added a commit that referenced this pull request May 15, 2026
The fixed 2s sleep before running install.ps1 was not reliable on the
windows-latest runner: when the Python http.server had not started yet,
the install script failed with "connection actively refused". The
failure was masked until #143 surfaced install.ps1 exit codes.

- Replace the fixed sleep with a 30s readiness poll that fails loudly
  and dumps the server log when the server never becomes reachable.
- Add actions/setup-python so the runner has a known-good Python on
  PATH regardless of windows-latest image migrations.
- Extract the duplicated server-startup and binary-verification logic
  into two composite actions (cli/serve-archive, cli/verify-installed-binary),
  used by all three install-test jobs.
- Standardize on http://127.0.0.1:8080 across platforms.
- Allow .github in .gitignore so the new composite actions are tracked
  despite the broad .* hidden-file rule.
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.

1 participant