Explorar o código

Fix: Prevent CDPATH from corrupting directory paths in copy scripts

Cas Ebbers hai 3 meses
pai
achega
918cc9689c
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      compose/bin/copyfromcontainer
  2. 1 1
      compose/bin/copytocontainer

+ 1 - 1
compose/bin/copyfromcontainer

@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a directory or file to copy from container (ex. vendor, --all)" && exit
 
-REAL_SRC=$(cd -P "src" && pwd)
+REAL_SRC=$(cd -P "src" >/dev/null && pwd)
 if [ ! -d "$REAL_SRC" ]; then
   mkdir -p "$REAL_SRC"
 fi

+ 1 - 1
compose/bin/copytocontainer

@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 [ -z "$1" ] && echo "Please specify a directory or file to copy to container (ex. vendor, --all)" && exit
 
-REAL_SRC=$(cd -P "src" && pwd)
+REAL_SRC=$(cd -P "src" >/dev/null && pwd)
 if [ "$1" == "--all" ]; then
   docker cp "$REAL_SRC/./" "$(bin/docker-compose ps -q phpfpm|awk '{print $1}')":/var/www/html/
   echo "Completed copying all files from host to container"