-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Use system_command
instead of system
in Casks
#23070
Comments
Would it also be possible to just "overwrite" the |
This is their overridden |
First Action item is complete - all instances of |
Closing in favour of https://github.com/caskroom/rubocop-cask/issues/46. |
system_command
was introduced way back in #5723 as an interface for Casks to run shell commands in *flight blocks without using backticks orKernel#system
, allowing us to capture the output and error out if the command failed.We've had some issues in the past where Casks silently failed to install or uninstall because a
system
call in a *flight block failed but no error was raised. Usingsystem_command
, such failures will be made apparent to the user, and thus to us when users create bug reports.We should also create a cop over in rubocop-cask to check for instances of
system
and warn the user to replace them withsystem_command
. We could even make it autocorrect to further reduce the burden on the user.Action items:
system
in Casks withsystem_command
system
instead ofsystem_command
The text was updated successfully, but these errors were encountered: