nix: show better error messages for missing arguments in hsie scripts (#1798)

This commit is contained in:
Wolfgang Walther
2021-04-09 18:48:00 +02:00
committed by GitHub
parent 67f555d24e
commit a5372e4713
+9 -3
View File
@@ -107,7 +107,7 @@ let
inRootDir = true;
}
''
dumpdir="$1"
dumpdir="''${1:?dumpdir not set}"
tmpdir="$(mktemp -d)"
mkdir -p "$dumpdir"
${cabal-install}/bin/cabal v2-build ${devCabalOptions} \
@@ -141,7 +141,10 @@ let
name = "postgrest-hsie-graph-modules";
docs = "Create a PNG graph of modules imported within the codebase.";
}
''${hsie} graph-modules main src | ${graphviz}/bin/dot -Tpng -o "$1"'';
''
outfile="''${1:?outfile not set}"
${hsie} graph-modules main src | ${graphviz}/bin/dot -Tpng -o "$outfile"
'';
hsieGraphSymbols =
checkedShellScript
@@ -149,7 +152,10 @@ let
name = "postgrest-hsie-graph-symbols";
docs = "Create a PNG graph of symbols imported within the codebase.";
}
''${hsieMinimalImports} graph-symbols | ${graphviz}/bin/dot -Tpng -o "$1"'';
''
outfile="''${1:?outfile not set}"
${hsieMinimalImports} graph-symbols | ${graphviz}/bin/dot -Tpng -o "$outfile"
'';
in
buildEnv {
name = "postgrest-devtools";