Skip to content

Commit

Permalink
Pass additional arguments to shell / root-shell commands (#208)
Browse files Browse the repository at this point in the history
Add `"$@"` to pass additional command-line arguments for `shell` / `root-shell` to `bash` in container.

This allows things like `sail shell -c "cd some-sub-module && npm install"`
  • Loading branch information
delitescere authored Aug 3, 2021
1 parent 05c2128 commit 9b4f0a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/sail
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ if [ $# -gt 0 ]; then
docker-compose exec \
-u sail \
"$APP_SERVICE" \
bash
bash "$@"
else
sail_is_not_running
fi
Expand All @@ -283,7 +283,7 @@ if [ $# -gt 0 ]; then
if [ "$EXEC" == "yes" ]; then
docker-compose exec \
"$APP_SERVICE" \
bash
bash "$@"
else
sail_is_not_running
fi
Expand Down

0 comments on commit 9b4f0a3

Please sign in to comment.