Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 2 additions & 15 deletions bin/_command_wrapper_run
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,6 @@ current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
bin_path="`dirname $0`"
root_dir="$( cd $bin_path && cd .. && pwd)"
relative_path=${PWD#$root_dir}
user_uid=1000
user_group=1000

if [[ "$OSTYPE" == "darwin"* ]]; then
user_uid=501
user_group=20
fi

# Load project specific variables.
set -o allexport
Expand All @@ -24,14 +17,8 @@ shift;
container=$PROJECT_NAME
container+="_$container_name"

# If the input comes from a pipe or file ("< something.txt") we cant use "t"
#flag since it will fail with "the input device is not a TTY"
# -t 0 == stdin
if [ -t 0 ]; then
tty="-it"
else
tty="-i"
fi
## MOVE TO FOLDER where docker-compose yml files are located
cd ${root_dir}

command="docker-compose run --rm node /bin/bash -c 'cd /var/www/html$relative_path && $@'"

Expand Down