Skip to content

Instantly share code, notes, and snippets.

@nfedyashev
Created May 16, 2013 15:18
Show Gist options
  • Save nfedyashev/5592494 to your computer and use it in GitHub Desktop.
Save nfedyashev/5592494 to your computer and use it in GitHub Desktop.
"heroku run" fix which respects rake task exit status
#Usage: heroku_run 'rake db:migrate' veeqo-staging
function heroku_run() {
buffer_file=/tmp/last_heroku_run_`date +%N`
heroku run "$1; echo \$?" --app $2 2>&1 | tee $buffer_file
return `tail -1 $buffer_file`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment