Skip to content

Commit

Permalink
Fix work dir in "Container ... already exists" message
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasselmeci committed Oct 23, 2023
1 parent 67205c7 commit d517b84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion initbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ $docker start $CONTAINER_NAME
sleep 2

if $container_already_exists; then
echo "Container $CONTAINER_NAME already exists; work dir is $work_dir"
existing_work_dir=$($docker exec $CONTAINER_NAME cat /home/build/.work_dir)
echo "Container $CONTAINER_NAME already exists; work dir is $existing_work_dir"
fi
if $container_already_exists && [[ $work_dir ]]; then # make sure work_dir is same as inside
real_work_dir=$(cd "$work_dir" 2>/dev/null && pwd -P)
Expand Down

0 comments on commit d517b84

Please sign in to comment.