Use rm -f to avoid hang waiting on input in check_gemfile
In certain docker setups, the Gemfile.lock file winds up being owned by the "wrong" user, so when the check_gemfile function tries to remove and re-touch it, the rm command hangs up waiting for a confirmation on "rm: remove write-protected regular file 'Gemfile.lock'?" The fix is to use rm -f which will not ask for the confirmation. Test plan: * docker_dev_update and update_canvas both still work Change-Id: Ie6f1be8d6b52284da59e2c0e4c55e1662fe2e7d2 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253405 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Charley Kline <ckline@instructure.com> Product-Review: Charley Kline <ckline@instructure.com> Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
This commit is contained in:
parent
088cd3b562
commit
7352275e07
|
@ -72,7 +72,7 @@ function check_gemfile {
|
|||
'For historical reasons, the Canvas Gemfile.lock is not tracked by git. We may
|
||||
need to remove it before we can install gems, to prevent conflicting depencency
|
||||
errors.'
|
||||
confirm_command 'rm Gemfile.lock' || true
|
||||
confirm_command 'rm -f Gemfile.lock' || true
|
||||
fi
|
||||
|
||||
# Fixes 'error while trying to write to `/usr/src/app/Gemfile.lock`'
|
||||
|
|
|
@ -95,7 +95,7 @@ function rebase_canvas {
|
|||
|
||||
function bundle_install {
|
||||
echo_console_and_log " Installing gems (bundle install) ..."
|
||||
rm Gemfile.lock* >/dev/null 2>&1
|
||||
rm -f Gemfile.lock* >/dev/null 2>&1
|
||||
bundle install >>"$LOG" 2>&1
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue