Skip to content

Commit

Permalink
Adding a test for $PWD in the container
Browse files Browse the repository at this point in the history
  • Loading branch information
bureado committed Feb 1, 2020
1 parent c86a715 commit 5ea2d2e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions toolbox
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,14 @@ run()
fi
fi

if ! $podman_command exec \
--user "$USER" \
"$toolbox_container" \
sh -c "test -d $PWD" >/dev/null 2>&3; then
echo "Directory $PWD does not exist in container $toolbox_container, try cd && !!" >&2
exit 127
fi

echo "$base_toolbox_command: running in container $toolbox_container:" >&3
echo "$base_toolbox_command: $program" >&3
for i in "$@"; do
Expand Down

0 comments on commit 5ea2d2e

Please sign in to comment.