From ba674c8bb4b9834d1d8de82243d5f6bc8507a1ba Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Tue, 27 Dec 2016 20:51:34 +0100 Subject: [PATCH] nix-script: don't add src for all commands --- pkgs/nix-tools/nix-script.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/nix-tools/nix-script.sh b/pkgs/nix-tools/nix-script.sh index 1d0fe13..b9de5f6 100755 --- a/pkgs/nix-tools/nix-script.sh +++ b/pkgs/nix-tools/nix-script.sh @@ -141,8 +141,10 @@ done if [ -z "$action" ]; then action='repl'; fi -if [ -z "$src" -a -f ./default.nix ]; then - src='./.' +if [ "$action" = instantiate -o "$action" = build -o "$action" = shell ]; then + if [ -z "$src" -a -f ./default.nix ]; then + src='./.' + fi fi if [ "$#" -gt 0 ]; then