From f12633c628c9f148762533ccd2084a01e540c4d5 Mon Sep 17 00:00:00 2001 From: Paul Colomiets Date: Sat, 12 Jul 2014 16:32:28 +0300 Subject: [PATCH] my-env: Support for running command directly by load-env-xxx script First I don't think there is a reason to run shell as a child of load-env-xxx script and not to just exec into it. Also it's often useful to just run a command inside the environment load-env-xxx command --args Closes #3254 --- pkgs/misc/my-env/loadenv.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/misc/my-env/loadenv.sh b/pkgs/misc/my-env/loadenv.sh index a162f8b853a..1aab4ac0208 100644 --- a/pkgs/misc/my-env/loadenv.sh +++ b/pkgs/misc/my-env/loadenv.sh @@ -11,5 +11,9 @@ export buildInputs export NIX_STRIP_DEBUG=0 export TZ="$OLDTZ" -@shell@ +if test $# -gt 0; then + exec "$@" +else + exec @shell@ +fi