Created
May 17, 2012 08:15
-
-
Save wnuqui/2717341 to your computer and use it in GitHub Desktop.
ruby's "system" call suddenly contradicts what I saw running the "rake tasks" in shell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# try running a rake task like | |
RAILS_ENV=test ANOTHER=imaginary rake foo:bar | |
# and run | |
rake foo:bar RAILS_ENV=test ANOTHER=imaginary | |
# both run right? | |
# now do this | |
ruby -e "system 'rake foo:bar RAILS_ENV=test ANOTHER=imaginary'" | |
# and this | |
ruby -e "system 'RAILS_ENV=test ANOTHER=imaginary rake foo:bar'" | |
# notice last one is quick to return, ignored? | |
# what is with ruby's system then? | |
# to add more load to the grey matter there then do this | |
ruby -e "system 'RAILS_ENV=test ANOTHER=imaginary rake foo:bar && rake foo:bar RAILS_ENV=test ANOTHER=imaginary'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment