nix: show better error messages for missing arguments in hsie scripts (#1798)
This commit is contained in:
+9
-3
@@ -107,7 +107,7 @@ let
|
|||||||
inRootDir = true;
|
inRootDir = true;
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
dumpdir="$1"
|
dumpdir="''${1:?dumpdir not set}"
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
mkdir -p "$dumpdir"
|
mkdir -p "$dumpdir"
|
||||||
${cabal-install}/bin/cabal v2-build ${devCabalOptions} \
|
${cabal-install}/bin/cabal v2-build ${devCabalOptions} \
|
||||||
@@ -141,7 +141,10 @@ let
|
|||||||
name = "postgrest-hsie-graph-modules";
|
name = "postgrest-hsie-graph-modules";
|
||||||
docs = "Create a PNG graph of modules imported within the codebase.";
|
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 =
|
hsieGraphSymbols =
|
||||||
checkedShellScript
|
checkedShellScript
|
||||||
@@ -149,7 +152,10 @@ let
|
|||||||
name = "postgrest-hsie-graph-symbols";
|
name = "postgrest-hsie-graph-symbols";
|
||||||
docs = "Create a PNG graph of symbols imported within the codebase.";
|
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
|
in
|
||||||
buildEnv {
|
buildEnv {
|
||||||
name = "postgrest-devtools";
|
name = "postgrest-devtools";
|
||||||
|
|||||||
Reference in New Issue
Block a user