nix: only json output for postgrest-dump-schema

This commit is contained in:
Laurence Isla
2024-03-07 16:50:14 +01:00
committed by Wolfgang Walther
parent c276e9741e
commit cf7b9bad08
+2 -6
View File
@@ -91,10 +91,7 @@ let
checkedShellScript checkedShellScript
{ {
name = "postgrest-dump-schema"; name = "postgrest-dump-schema";
docs = "Dump the loaded schema's SchemaCache in JSON or Yaml format."; docs = "Dump the loaded schema's SchemaCache in JSON format.";
args = [
"ARG_OPTIONAL_BOOLEAN([yaml], [y], [Dump the schema cache in Yaml format])"
];
workingDir = "/"; workingDir = "/";
withEnv = postgrest.env; withEnv = postgrest.env;
withPath = [ jq ]; withPath = [ jq ];
@@ -102,8 +99,7 @@ let
'' ''
${withTools.withPg} -f test/spec/fixtures/load.sql \ ${withTools.withPg} -f test/spec/fixtures/load.sql \
${cabal-install}/bin/cabal v2-run ${devCabalOptions} --verbose=0 -- \ ${cabal-install}/bin/cabal v2-run ${devCabalOptions} --verbose=0 -- \
postgrest --dump-schema \ postgrest --dump-schema
| if [ "$_arg_yaml" = on ]; then ${yq}/bin/yq -y .; else cat; fi
''; '';
coverage = coverage =