fix: handle case in ubuntu 16.04 where popd may fail if the dokku user does not have rights to execute in the executing user's $PWD.
Closes #2978
This commit is contained in:
1 parent
fe6f339890
commit
6528c4511a
1 file changed
+1
-1
@@ -23,7 +23,7 @@ apps_clone_cmd() {
|
|||||||
apps_create "$NEW_APP"
|
apps_create "$NEW_APP"
|
||||||
pushd "$DOKKU_ROOT/$OLD_APP/." > /dev/null
|
pushd "$DOKKU_ROOT/$OLD_APP/." > /dev/null
|
||||||
find ./* -not \( -name .cache \) | grep -v "./cache" | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
find ./* -not \( -name .cache \) | grep -v "./cache" | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||||
popd > /dev/null
|
popd > /dev/null 2>&1 || pushd "/tmp" > /dev/null
|
||||||
|
|
||||||
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
if [[ -d "$NEW_CACHE_DIR" ]] && ! rmdir "$NEW_CACHE_DIR"; then
|
||||||
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
docker run "$DOKKU_GLOBAL_RUN_ARGS" --rm -v "$NEW_CACHE_DIR:/cache" "dokku/$OLD_APP" chmod 777 -R /cache
|
||||||
|
|||||||
Reference in new issue
Block a user