fix(init): remove Unix-only stderr redirection from gh label create#835
Open
AntonioGassner wants to merge 1 commit into
Open
fix(init): remove Unix-only stderr redirection from gh label create#835AntonioGassner wants to merge 1 commit into
AntonioGassner wants to merge 1 commit into
Conversation
The `gh label create` call in `sandcastle init` used a `2>/dev/null` redirection, which is invalid in Windows PowerShell/cmd and causes init to fail when creating the Sandcastle label. The redirection was redundant because `execSync` already runs with `stdio: "ignore"`, which discards stderr on every platform. Removing it makes init work on Windows with no behavior change on macOS/Linux. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
@AntonioGassner is attempting to deploy a commit to the Matt Pocock's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Reason: Branch advanced during review run. Workflow run: https://github.com/mattpocock/sandcastle/actions/runs/27790452873 Re-add |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
sandcastle initfails on Windows at the "create theSandcastleGitHub label" step. Thegh label createinvocation insrc/cli.tsends with a2>/dev/nullstderr redirection — Unix shell syntax that PowerShell and cmd do not understand — so the spawned command errors on Windows hosts.Fix
Remove the
2>/dev/null. It was redundant: theexecSynccall already runs withstdio: "ignore", which discards stdout and stderr on every platform. Dropping the redirection is a no-op on macOS/Linux (stderr was already suppressed bystdio: "ignore") and unblocks Windows.Testing
Verified on macOS:
npm run typecheckpasses.npm run buildsucceeds.sandcastle init --issue-tracker github-issues --create-label truestill creates theSandcastlelabel.ghlabel error.gh label list --search Sandcastlethat the label is created (Sandcastle, "Issues for Sandcastle to work on",#F9A825).Changeset
Included (
patch) — user-facing fix to theinitflow.