From 731d391f94c8c8fd5f4f79199d644380b430e769 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Thu, 14 May 2020 14:48:37 +0100 Subject: [PATCH] bin/run-with-shell-env: Preserve the original argument list. The `profile' script makes use of `set', which trashes the argument list. Capture it in a shell array at the start (because we're using Bash here) and then run the target program from the array. --- bin/run-with-shell-env | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/run-with-shell-env b/bin/run-with-shell-env index ba0afcf..00181e3 100755 --- a/bin/run-with-shell-env +++ b/bin/run-with-shell-env @@ -1,5 +1,6 @@ #! /bin/bash -x exec >/tmp/mdw/hacky.log 2>&1 +declare -a original_args=("$@") case ${__mdw_profile+t} in t) ;; *) @@ -10,4 +11,4 @@ case ${__mdw_profile+t} in set -x ;; esac -exec "$@" +exec "${original_args[@]}" -- 2.11.0