fix: do not attempt to move the Dockerfile if it is the default path
Also drop the unnecessary rm call
This commit is contained in:
committed by
GitHub
parent
fd28bf53de
commit
51c5c58354
@@ -16,15 +16,16 @@ trigger-builder-dockerfile-core-post-extract() {
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ ! -f "$NEW_DOCKERFILE" ]]; then
|
||||
dokku_log_fail "Invalid dockerfile-path specified: $NEW_DOCKERFILE"
|
||||
rm -f Dockerfile
|
||||
if [[ "$NEW_DOCKERFILE" == "Dockerfile" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
if [[ "$NEW_DOCKERFILE" != "Dockerfile" ]]; then
|
||||
mv "$NEW_DOCKERFILE" Dockerfile
|
||||
if [[ ! -f "$NEW_DOCKERFILE" ]]; then
|
||||
dokku_log_fail "Invalid dockerfile-path specified: $NEW_DOCKERFILE"
|
||||
return
|
||||
fi
|
||||
|
||||
mv "$NEW_DOCKERFILE" Dockerfile
|
||||
popd &>/dev/null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user