nix: Refactor checkedShellScript's inRootDir to workingDir

This allows more flexible control over the working directory. Values for workingDir must always start
with a / and will then be relative to the repo root.
This commit is contained in:
Wolfgang Walther
2024-02-18 13:10:00 +01:00
committed by Wolfgang Walther
parent 75a86ba873
commit e110fdbd2c
10 changed files with 37 additions and 34 deletions
+6 -6
View File
@@ -34,7 +34,7 @@ let
"ARG_USE_ENV([PGOPTIONS], [-c search_path=public,test], [PG options to use])"
];
positionalCompletion = "_command";
inRootDir = true;
workingDir = "/";
redirectTixFiles = false;
withPath = [ postgresql ];
withTmpDir = true;
@@ -139,7 +139,7 @@ let
"ARG_LEFTOVERS([command arguments])"
];
positionalCompletion = "_command";
inRootDir = true;
workingDir = "/";
}
(lib.concatStringsSep "\n\n" runners);
@@ -161,7 +161,7 @@ let
"ARG_USE_ENV([PGDELAY], [0ms], [extra PG latency (duration)])"
];
positionalCompletion = "_command";
inRootDir = true;
workingDir = "/";
redirectTixFiles = false;
withTmpDir = true;
}
@@ -199,7 +199,7 @@ let
"ARG_USE_ENV([PGRST_DELAY], [0ms], [extra PostgREST latency (duration)])"
];
positionalCompletion = "_command";
inRootDir = true;
workingDir = "/";
redirectTixFiles = false;
withTmpDir = true;
}
@@ -249,7 +249,7 @@ let
_command_offset 2
fi
'';
inRootDir = true;
workingDir = "/";
}
''
# not using withTmpDir here, because we don't want to keep the directory on error
@@ -360,7 +360,7 @@ let
"ARG_LEFTOVERS([command arguments])"
];
positionalCompletion = "_command";
inRootDir = true;
workingDir = "/";
withEnv = postgrest.env;
withTmpDir = true;
}