diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-04-23 00:02:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 00:02:30 +0000 |
commit | 3e8920f50b7356e85b474ffd22c59b7a9c9c1524 (patch) | |
tree | 6c3f194d5720cef6ee2cba5a77b36fec8f50fd59 /pkgs/build-support | |
parent | 6162a4e3f9882b6d67379429520843c28c3adbc3 (diff) | |
parent | 16da38cd4f2760e5390573c198287d3de113e5d3 (diff) |
Merge master into staging-next
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/trivial-builders/default.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/pkgs/build-support/trivial-builders/default.nix b/pkgs/build-support/trivial-builders/default.nix index d7438923a54b8..1625b0c96719c 100644 --- a/pkgs/build-support/trivial-builders/default.nix +++ b/pkgs/build-support/trivial-builders/default.nix @@ -234,6 +234,12 @@ rec { */ excludeShellChecks ? [ ], /* + Extra command-line flags to pass to ShellCheck. + + Type: [String] + */ + extraShellCheckFlags ? [ ], + /* Bash options to activate with `set -o` at the start of the script. Defaults to `[ "errexit" "nounset" "pipefail" ]`. @@ -282,11 +288,11 @@ rec { # but we still want to use writeShellApplication on those platforms let shellcheckSupported = lib.meta.availableOn stdenv.buildPlatform shellcheck-minimal.compiler; - excludeOption = lib.optionalString (excludeShellChecks != [ ]) "--exclude '${lib.concatStringsSep "," excludeShellChecks}'"; + excludeFlags = lib.optionals (excludeShellChecks != [ ]) [ "--exclude" (lib.concatStringsSep "," excludeShellChecks) ]; shellcheckCommand = lib.optionalString shellcheckSupported '' # use shellcheck which does not include docs # pandoc takes long to build and documentation isn't needed for just running the cli - ${lib.getExe shellcheck-minimal} ${excludeOption} "$target" + ${lib.getExe shellcheck-minimal} ${lib.escapeShellArgs (excludeFlags ++ extraShellCheckFlags)} "$target" ''; in if checkPhase == null then '' |