1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-10 04:43:53 +02:00

Fix a few shellcheck tests

Ref nixos/nix#10795
This commit is contained in:
Bryan Honof 2024-08-02 00:10:08 +02:00
parent 612fc76020
commit cc9fe4dee7
No known key found for this signature in database
13 changed files with 102 additions and 106 deletions

View file

@ -14,7 +14,7 @@ expect 1 false
expect 1 expect 0 false
function ret() {
return $1
return "$1"
}
# `expect` can call functions, not just executables
@ -48,6 +48,7 @@ expectStderr 1 noisyFalse | grepQuiet NAY
# `set -o pipefile` is enabled
# shellcheck disable=SC2317# shellcheck disable=SC2317
pipefailure () {
# shellcheck disable=SC2216
true | false | true
@ -55,6 +56,7 @@ pipefailure () {
expect 1 pipefailure
unset pipefailure
# shellcheck disable=SC2317
pipefailure () {
# shellcheck disable=SC2216
false | true | true
@ -82,6 +84,7 @@ expect 1 useUnbound
# ! alone unfortunately negates `set -e`, but it works in functions:
# shellcheck disable=SC2251
! true
# shellcheck disable=SC2317
funBang () {
! true
}