-
-
Notifications
You must be signed in to change notification settings - Fork 368
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 npm-run-all for danger:prepush to run scripts in sequence #1254
Conversation
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.
I commented in #1252 not realizing this PR existed.
Sorry, I’d prefer using the &&
syntax instead of pulling a new dependency for this purpose.
This change adds extra maintenance burden without enough benefit in my opinion.
I find "&&" less readable; also it doesn't work on all platforms. Up to maintainers of course what platforms they want to support for development. npm-run-all also has "build:*" syntax to automatically run all jobs matching, but then the ordering would be incorrect. the other way to solve this is with dependencies. i.e each script can have "pre" script, i.e if you run "build:bla" then "prebuild:bla" is checked and ran. I'm not sure if this is yarn thing, or npm does it too. |
I do understand that some shell syntaxes are maybe foreign for some people. That said, using This repo has a small-to-medium amount of shell commands, and this PR is only “helping” one of those commands. As a result, I’m just not convinced that the benefit outweighs the maintenance burden of a new dependency. Additionally, looking at the tool’s pages on npmJS and Github, it hasn’t had a release in 3 years, it “supports” |
What I've heard is that windows platforms don't do POSIX shell syntax. I have no way to verify this. but the original problem is that the prepush pipeline doesn't abort on the first error, shall I provide PR with using |
I would be happy to review/approve a PR that solves it without adding a dependency if you want to contribute it! Thanks for understanding @glensc! |
Replacement: #1258 |
Noticed that "danger:prepush" ran commands with ";" rather "&&" meaning the next command is still executed if the previous one failed. This resulted in wery weird errors due to the previous step failure.
This PR uses "npm-run-all" module for platform agnostic and clean API support: