From e6f2ee6499a0f91d6f625128a8caf81870c18814 Mon Sep 17 00:00:00 2001 From: Jose Diaz-Gonzalez Date: Sun, 30 Aug 2020 13:38:31 -0400 Subject: [PATCH] fix: handle edge cases during procfile removal --- plugins/ps/procfile-remove | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/ps/procfile-remove b/plugins/ps/procfile-remove index 2d2f8373a..28b1ced70 100755 --- a/plugins/ps/procfile-remove +++ b/plugins/ps/procfile-remove @@ -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 "$@"