Skip to content

Run the SSMS restore step under pwsh with per-command exit checks (#655) - #657

Merged
erikdarlingdata merged 1 commit into
devfrom
fix/655-ssms-restore-pwsh
Oct 15, 2026
Merged

erikdarlingdata merged 1 commit into
devfrom
fix/655-ssms-restore-pwsh

Conversation

@erikdarlingdata

Copy link
Copy Markdown
Owner

Why

The first dev run of the two-job dependency submission workflow from #656, run 38660830104, failed at the Restore SSMS projects step:

msbuild: command not found
Error: Process completed with exit code 127.

The submit job was skipped, so dev got no snapshot from that run.

Cause

The round-1 review of #656 switched that step to shell: bash so the first failing restore would fail the step (pwsh only reports the last command's exit code). On the Windows runner the msbuild folder that microsoft/setup-msbuild adds to PATH reaches pwsh steps but not bash steps. The green run before that change (38657114293) ran the step under pwsh.

Change

One step in .github/workflows/dependency-submission.yml:

  • shell: pwsh instead of shell: bash.
  • Each of the three restore commands is followed by if ($LASTEXITCODE) { exit $LASTEXITCODE }, so a failure in the first or second command still fails the step.
  • The comment above the step explains both points and names the failed run.

Nothing else in the workflow changes. The submit job, the snapshot script and the artifact handling are untouched.

Verification

  • The workflow runs on push to dev, so the merge of this PR is the test. Expected: detect and submit both green, and the submit log prints result: ACCEPTED (dev is not the default branch, so GitHub accepts the snapshot without using it for alerts).

Refs #655.

🤖 Generated with Claude Code

https://claude.ai/code/session_018MrD9SGvLFx4kJaeGZyXG9

The first dev run of the two-job workflow (38660830104) failed at "Restore SSMS
projects" with "msbuild: command not found". The round-1 review had switched the
step to bash so the first failing restore would fail the step, but the msbuild
folder that setup-msbuild adds to PATH does not reach a bash step on the Windows
runner. It did reach the pwsh step in the green run before that change.

The step runs under pwsh again, and each restore checks $LASTEXITCODE so a
failure in the first or second command still fails the step.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MrD9SGvLFx4kJaeGZyXG9
@claude

claude Bot commented Oct 15, 2026

Copy link
Copy Markdown

Reviewed the diff: a single workflow step switched to pwsh with per-command $LASTEXITCODE checks. The check after the last msbuild call is redundant, since pwsh already reports the last command's exit code. It's harmless. I found no correctness, security or convention issues. The merge to dev is the real test, as the description says.

@erikdarlingdata
erikdarlingdata merged commit 4e63d5d into dev Oct 15, 2026
3 checks passed
@erikdarlingdata
erikdarlingdata deleted the fix/655-ssms-restore-pwsh branch October 15, 2026 00:46
@erikdarlingdata erikdarlingdata mentioned this pull request Oct 20, 2026
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