Skip to content

Commit

Permalink
heroku setup: pass through seed exit status (#4918)
Browse files Browse the repository at this point in the history
We fix a bug in the setup script that always causes the exit code of the
rails db setup and seeding to be successful because it used the exit
code of `heroku run` itself. We add a flag that will instead pass
through the exit code of the underlying run, in this case, the `rails`
command.
  • Loading branch information
tfidfwastaken authored Apr 23, 2024
1 parent 9e64238 commit b6ec71a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/setup_heroku_instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ resultOfServerPush=$?
resultOfSeedDataSetup=0
if [ ${serverAppAlreadyExists} = false ]; then
echo "Setting up initial seed data"
(cd $serverAppDirectory && heroku run rails db:structure:load:with_data db:seed --app=$herokuAppName)
(cd $serverAppDirectory && heroku run --exit-code rails db:structure:load:with_data db:seed --app=$herokuAppName)
resultOfSeedDataSetup=$?
fi

Expand Down

0 comments on commit b6ec71a

Please sign in to comment.