From a7c966bfde7465496a3a5899d86af8db0e37ce90 Mon Sep 17 00:00:00 2001 From: Josh Graham <134630+delitescere@users.noreply.github.com> Date: Tue, 3 Aug 2021 09:06:29 +1000 Subject: [PATCH] Pass additional arguments to shell / root-shell commands 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"` --- bin/sail | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/sail b/bin/sail index 35ea341b..fbb34756 100755 --- a/bin/sail +++ b/bin/sail @@ -271,7 +271,7 @@ if [ $# -gt 0 ]; then docker-compose exec \ -u sail \ "$APP_SERVICE" \ - bash + bash "$@" else sail_is_not_running fi @@ -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