-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dev for Ruby apps #4522
Fix dev for Ruby apps #4522
Conversation
We detected some changes at either packages/*/src or packages/cli-kit/assets/cli-ruby/** and there are no updates in the .changeset. |
@@ -121,8 +121,8 @@ Running system process: | |||
} | |||
|
|||
function checkCommandSafety(command: string) { | |||
const commandDirectory = dirname(which.sync(command)) | |||
if (commandDirectory === cwd()) { | |||
const commandPath = which.sync(command, {nothrow: true}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nothrow
makes it return null instead of raising an error when the command is not found. More info: https://github.com/npm/node-which?tab=readme-ov-file#usage
Coverage report
Test suite run success1897 tests passing in 862 suites. Report generated by 🧪jest coverage report action from a84792f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few questions first!
Closing in favor of #4527 |
WHY are these changes introduced?
Fixes #4507
In #4401 we added a mechanism to check the safety of external binary runs from the CLI, but it caused
bin/rails
commands to fail, making thedev
command to crash with Ruby apps.WHAT is this pull request doing?
Avoid the
which
function to raise errors, used to find out where a binary is.How to test your changes?
Create a Ruby app and run dev
Measuring impact
How do we know this change was effective? Please choose one:
Checklist