Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Issue 705. Handling white space in path #810

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
16 changes: 8 additions & 8 deletions run-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ copy_or_merge_envs() {
cp "$src_file" "$dest_file"
echo -e "Created env for ""$blue_text""$displayed_reason""$default_text"" at ""$blue_text""$dest_file""$default_text""."
elif [ "$opt_only_env" = true ] || [ "$opt_update" = true ]; then
python3 $script_dir/docker/scripts/merge_env.py "$src_file" "$dest_file"
python3 "$script_dir/docker/scripts/merge_env.py" "$src_file" "$dest_file"
if [ $? -ne 0 ]; then
exit 1
fi
Expand Down Expand Up @@ -219,7 +219,7 @@ setup_env() {
fi
echo -e "Created env for ""$blue_text""$service""$default_text" at ""$blue_text""$env_path""$default_text"."
elif [ "$opt_only_env" = true ] || [ "$opt_update" = true ]; then
python3 $script_dir/docker/scripts/merge_env.py $sample_env_path $env_path
python3 "$script_dir/docker/scripts/merge_env.py" $sample_env_path $env_path
ritwik-g marked this conversation as resolved.
Show resolved Hide resolved
if [ $? -ne 0 ]; then
exit 1
fi
Expand All @@ -237,19 +237,19 @@ setup_env() {
}

build_services() {
pushd ${script_dir}/docker 1>/dev/null
pushd "$script_dir/docker" 1>/dev/null

if [ "$opt_build_local" = true ]; then
echo -e "$blue_text""Building""$default_text"" docker images ""$blue_text""$opt_version""$default_text"" locally."
VERSION=$opt_version $docker_compose_cmd -f $script_dir/docker/docker-compose.build.yaml build || {
VERSION=$opt_version $docker_compose_cmd -f "$script_dir/docker/docker-compose.build.yaml" build || {
echo -e "$red_text""Failed to build docker images.""$default_text"
exit 1
}
elif [ "$first_setup" = true ] || [ "$opt_update" = true ]; then
echo -e "$blue_text""Pulling""$default_text"" docker images tag ""$blue_text""$opt_version""$default_text""."
# Try again on a slow network.
VERSION=$opt_version $docker_compose_cmd -f $script_dir/docker/docker-compose.yaml pull ||
VERSION=$opt_version $docker_compose_cmd -f $script_dir/docker/docker-compose.yaml pull || {
VERSION=$opt_version $docker_compose_cmd -f "$script_dir/docker/docker-compose.yaml" pull ||
VERSION=$opt_version $docker_compose_cmd -f "$script_dir/docker/docker-compose.yaml" pull || {
echo -e "$red_text""Failed to pull docker images.""$default_text"
echo -e "$red_text""Either version not found or docker is not running.""$default_text"
echo -e "$red_text""Please check and try again.""$default_text"
Expand All @@ -265,7 +265,7 @@ build_services() {
}

run_services() {
pushd ${script_dir}/docker 1>/dev/null
pushd "$script_dir/docker" 1>/dev/null

echo -e "$blue_text""Starting docker containers in detached mode""$default_text"
VERSION=$opt_version $docker_compose_cmd up -d
Expand Down Expand Up @@ -313,7 +313,7 @@ opt_version="latest"
script_dir=$(dirname "$(readlink -f "$BASH_SOURCE")")
first_setup=false
# Extract service names from docker compose file.
services=($(VERSION=$opt_version $docker_compose_cmd -f $script_dir/docker/docker-compose.build.yaml config --services))
services=($(VERSION=$opt_version $docker_compose_cmd -f "$script_dir/docker/docker-compose.build.yaml" config --services))

display_banner
parse_args $*
Expand Down