Skip to content

Commit

Permalink
Fix: Issue 705. Handling white space in path (#810)
Browse files Browse the repository at this point in the history
* Fix: Issue 705. Handling white space in path

* Fixed env merge issue

---------

Signed-off-by: Ritwik G <[email protected]>
Co-authored-by: Hari John Kuriakose <[email protected]>
Co-authored-by: vishnuszipstack <[email protected]>
  • Loading branch information
3 people authored Jan 9, 2025
1 parent b1bef07 commit fc60cf0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions run-platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,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 @@ -223,7 +223,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"
if [ $? -ne 0 ]; then
exit 1
fi
Expand All @@ -241,19 +241,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 @@ -270,7 +270,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 @@ -321,7 +321,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))
current_version=""
target_branch=""

Expand Down

0 comments on commit fc60cf0

Please sign in to comment.