fix(config): discover npm/bun IaC runner bin symlinks - #1033
Open
UrbanChrisy wants to merge 1 commit into
Open
Conversation
Package managers install node_modules/.bin entries as 0777 symlinks (and often the target script as 0777). The project-runner trust check treated those mode bits as "writable by others" and rejected every local railway SDK install, so `railway config plan/apply` fell through to PATH and failed with ENOENT for global CLI users. Only treat group/world-writable *directories* as an untrusted path.
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
railway config plan/applylooks up the TypeScript IaC runner atnode_modules/.bin/railway-iac-ts, then rejects candidates that appear "writable by others".0777symlinks (and often ship the target script as0777too). On Unix those mode bits are not a substitution risk — replacing a path component requires a writable directory.railwaySDK install, fell through to PATHrailway-iac-ts, and failed withENOENTfor users running the globally installed CLI.Test plan
cargo test runner_discovery_tests(4 passed), including new regression for permissive.binsymlink +0777targetrailwayinstalled and.railway/railway.ts, run the global CLI (~/.railway/bin/railway config plan) withoutnode_modules/.binonPATHand confirm it finds the project runner