From 8975b7b0e2f7b02af03175ca4552f74c668b77ca Mon Sep 17 00:00:00 2001 From: cfhammill Date: Mon, 13 Jul 2020 17:20:14 -0400 Subject: [PATCH] singularity-tools: Check for /bin/sh existence before symlink Fixes the case where the user has bashInteractive in the container contents --- pkgs/build-support/singularity-tools/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/singularity-tools/default.nix b/pkgs/build-support/singularity-tools/default.nix index 54749e416ea3..cf234abb55fe 100644 --- a/pkgs/build-support/singularity-tools/default.nix +++ b/pkgs/build-support/singularity-tools/default.nix @@ -86,7 +86,9 @@ rec { done # Create runScript and link shell - ln -s ${runtimeShell} bin/sh + if [ ! -e bin/sh ]; then + ln -s ${runtimeShell} bin/sh + fi mkdir -p .singularity.d ln -s ${runScriptFile} .singularity.d/runscript