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

tasks running before others complete #50

Closed
ralyodio opened this issue Nov 7, 2013 · 4 comments
Closed

tasks running before others complete #50

ralyodio opened this issue Nov 7, 2013 · 4 comments

Comments

@ralyodio
Copy link

ralyodio commented Nov 7, 2013

I posted about this issue, but it seems when I run rsync, the subsequent tasks are running before rsync finishes. The shell:clean is deleting files before shell:sync finishes.

http://stackoverflow.com/questions/19847247/do-grunt-tasks-wait-for-previous-tasks-to-finish/19847677?noredirect=1#19847677

@ralyodio
Copy link
Author

ralyodio commented Nov 7, 2013

So I tried grunt-exec and it reported an error exit code on the rsync command. I believe the output buffer is too large maybe. Not sure, but I think grunt-shell should fail on erroneous exit codes like grunt-exec does.

When I run rsync with -q (quiet) the command finishes.

@sindresorhus
Copy link
Owner

@jonhatalla
Copy link

I am experiencing this issue as well, except with completely different types of shell commands.

my angular project requires rails backend - so i'm running bundle install in one shell command, and then in another running bundle exec db:reset, etc

if i run these command separately (e.g. grunt shell:build_ruby), everything executes completely and finishes in order. However when I run them in sequence in a combined grunt task, such as...
grunt.registerTask('load:admin_server', [
'shell:checkout_admin',
'shell:build_admin',
'shell:run_server'
]);

the build_admin task does not have time to complete, and is brushed over. If i put a dummy command such as 'pwd' early in that script - it sometimes appears in the logs for shell:run_server

I can provide more examples of this if needed.

@ralyodio
Copy link
Author

i switched to grunt-contrib-exec and everything works in order.

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

No branches or pull requests

3 participants