From fd57fa1bb312d7e434a3359cea288046680a47a9 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Mon, 25 Jul 2022 12:25:14 -0700 Subject: [PATCH] Updated SC2319 (markdown) --- SC2319.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC2319.md b/SC2319.md index 831d6b5..65fd919 100644 --- a/SC2319.md +++ b/SC2319.md @@ -47,7 +47,7 @@ In the second problematic example, `exit $?` will always `exit 0`, because it on ### Exceptions: -If you intentionally refer to a condition to get its exit status, as in `[ -e file ]; exists=$?`, you can ignore this warning. Alternatively, write it out as in `if ! [ -e file ]; then exists=0; else exists=1; fi`. +None. Note that ShellCheck does not warn if the usage of `$?` after `[ .. ]` is unconditional, as in `[ -d dir ]; return $?`. ### Related resources: