Repository navigation
Conversation
The tsx step swallowed install output with `>/dev/null 2>&1` and probed the version with a fallback to `""`, so a failed/off-PATH global install still printed `tsx installed ()` and exited 0 (false success). On the hermetic Nix image the global npm prefix lands off-PATH (vig-os/devkit#728), masking that tsx was missing. Drop the output swallow and check the install exit status; after install, verify tsx is reachable on PATH, fall back to the pinned local devDependency via `npx --no-install tsx`, and exit non-zero with a clear message when neither is available. Also document that the apt/NodeSource path is a guarded Debian-only fallback whose removal is tracked separately (#29, #14/#28). Behaviour is unchanged on the current Debian image. Refs: #30
Contributor
Author
|
Superseded by the devkit 1.1.0 migration (#32, commit The masked-tsx-failure / apt-assumption root cause is fully resolved by that removal — exactly the fix #30 itself recommended ("remove the apt/NodeSource path once the devcontainer bump lands"). #30 is already closed as completed. Closing as obsolete. |
10 of 21 tasks
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.
Summary
.devcontainer/scripts/post-create.shmasked tsx install failures and could report a false success. The tsx step rannpm install -g tsx >/dev/null 2>&1then printedtsx installed (<version>)using a probe that falls back to""on failure. On the new hermetic Nix image the global npm prefix lands off-PATH(vig-os/devkit#728), sotsxwas not actually available, yet the script printedtsx installed ()and exited 0.Changes
>/dev/null 2>&1and check the real exit status ofnpm install -g tsx; exit non-zero with a clear message if the install command itself fails.command -v tsxsucceeds, use it. Otherwise fall back to the pinned local devDependency vianpx --no-install tsx(tsx is already indevDependencies). If neither is reachable, exit non-zero with an actionable message instead of reporting false success.command -v node/npm(so it is skipped on the Nix image where Node is baked in). Full removal is tracked separately under the devcontainer bump ([TASK] Update devcontainer #29) and node-24 work ([TASK] Upgrade action to support Node.js 24 runtime #14/Migrate GitHub Action from Node.js 20 before runner deprecation #28) — not ripped out here.Behaviour is unchanged on the current Debian image (
ghcr.io/vig-os/devcontainer:0.1) where the global tsx is onPATH.Verification
shellcheck -xandbash -npass. Simulated all four code paths with stubbedtsx/npm/npx:... (via npx), exit 0npm install -g tsxitself failsContext
Found while live-testing the vigOS devcontainer Nix migration. Related upstream image fixes: vig-os/devkit#727 (
/usr/bin/env) and vig-os/devkit#728 (npm global prefix off-PATH).Closes #30