script: stop on error by default
This commit is contained in:
parent
60248ab06b
commit
422d359b48
@ -5,8 +5,12 @@
|
||||
{
|
||||
script
|
||||
, shell ? "/bin/sh"
|
||||
, exitOnError ? true
|
||||
}:
|
||||
|
||||
let
|
||||
setcmd = if exitOnError then "set -e" else "";
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "script";
|
||||
preferLocalBuild = true;
|
||||
@ -14,6 +18,7 @@ stdenv.mkDerivation {
|
||||
installPhase = ''
|
||||
cat > $out <<'EOF'
|
||||
#!${shell}
|
||||
${setcmd}
|
||||
|
||||
${script}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user