From 81c81fe851995d77f06d34911c9dfd8db33d0842 Mon Sep 17 00:00:00 2001 From: Maksym Kulikovskiy Date: Thu, 2 Feb 2023 14:56:48 -0800 Subject: [PATCH] make it clear command return code is "used", not "reused" --- SC2164.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC2164.md b/SC2164.md index 7a177da..50a3d4b 100644 --- a/SC2164.md +++ b/SC2164.md @@ -35,7 +35,7 @@ If/when it does, the script will keep going and do all its operations in the wro To avoid this, make sure you handle the cases when `cd` fails. Ways to do this include -* `cd foo || exit` as suggested to abort immediately, reusing exit code from failed `cd` command +* `cd foo || exit` as suggested to abort immediately, using exit code from failed `cd` command * `cd foo || { echo "Failure"; exit 1; }` abort with custom message * `cd foo || ! echo "Failure"` omitting "abort with custom message" * `if cd foo; then echo "Ok"; else echo "Fail"; fi` for custom handling