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:
1 parent
fd28bf53de
commit
51c5c58354
1 file changed
+6
-5
@@ -16,15 +16,16 @@ trigger-builder-dockerfile-core-post-extract() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f "$NEW_DOCKERFILE" ]]; then
|
if [[ "$NEW_DOCKERFILE" == "Dockerfile" ]]; then
|
||||||
dokku_log_fail "Invalid dockerfile-path specified: $NEW_DOCKERFILE"
|
|
||||||
rm -f Dockerfile
|
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$NEW_DOCKERFILE" != "Dockerfile" ]]; then
|
if [[ ! -f "$NEW_DOCKERFILE" ]]; then
|
||||||
mv "$NEW_DOCKERFILE" Dockerfile
|
dokku_log_fail "Invalid dockerfile-path specified: $NEW_DOCKERFILE"
|
||||||
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
mv "$NEW_DOCKERFILE" Dockerfile
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user