Skip to content
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

Synchronized commands chaining for npm scripts #38

Merged
merged 1 commit into from
Apr 9, 2024

Conversation

bogdan-rosianu
Copy link
Contributor

Type

  • Bug
  • Feature
  • Refactoring
  • Performance improvement

Problem setting

  • commands chaining was not working every time because & makes the commands run asynchronously and in most cases the commands were dependent on the previous command's success

Proposed Changes

  • use && instead of & because it will only continue with the next command AFTER the first command's exit code is 0 (successful)

Example

sleep 10 & print "test"

that will print 'test' asynchronously

vs

sleep 10 && print "test"

that will wait 10 seconds and only after that it will print 'test'

@bogdan-rosianu bogdan-rosianu changed the title synchronize scripts commands run Synchronized commands chaining for npm scripts Apr 8, 2024
@bogdan-rosianu bogdan-rosianu merged commit ae268df into main Apr 9, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants