diff --git a/sdk_lib/enter_chroot.sh b/sdk_lib/enter_chroot.sh index a017285b51..3d7582f5a4 100755 --- a/sdk_lib/enter_chroot.sh +++ b/sdk_lib/enter_chroot.sh @@ -418,8 +418,9 @@ function teardown_env { # starting the syncer process when this occurs by deleting the # PID file. kill $(<"${SYNCERPIDFILE}") && \ - sudo rm -f "${SYNCERPIDFILE}" || \ - debug "Unable to clean up syncer process."; + { rm -f "${SYNCERPIDFILE}" 2>/dev/null || \ + sudo rm -f "${SYNCERPIDFILE}" ; } || + debug "Unable to clean up syncer process."; debug "Unmounting chroot environment." safe_umount_tree "${MOUNTED_PATH}/"