fix: handle edge cases during procfile removal

This commit is contained in:
Jose Diaz-Gonzalez
2020-08-30 13:38:31 -04:00
parent 8f671b43ae
commit e6f2ee6499

View File

@@ -12,7 +12,11 @@ trigger-ps-procfile-remove() {
PROCFILE_PATH="$DOKKU_LIB_ROOT/data/ps/$APP/Procfile.extracted"
fi
rm "$PROCFILE_PATH"
if [[ ! -f "$PROCFILE_PATH" ]]; then
return
fi
rm -f "$PROCFILE_PATH" 2>/dev/null
}
trigger-ps-procfile-remove "$@"