From 4de7cb89efd42e23b2208d135d505f2acbae98a9 Mon Sep 17 00:00:00 2001 From: Dan Griscom <57565104+dtgriscom-ta@users.noreply.github.com> Date: Sun, 7 Jan 2024 10:16:11 -0500 Subject: [PATCH] Clarify wording of demo error message --- SC2155.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SC2155.md b/SC2155.md index db4763b..071546f 100644 --- a/SC2155.md +++ b/SC2155.md @@ -50,9 +50,9 @@ foo=$(mycmd) The exit status of the command is overridden by the exit status of the creation of the local variable. For example: ```bash -$ f() { local foo=$(false) && echo "silent error happened"; }; f -silent error happened -$ f() { local foo; foo=$(false) && echo "silent error happened"; }; f +$ f() { local foo=$(false) && echo "error was hidden"; }; f +error was hidden +$ f() { local foo; foo=$(false) && echo "error was hidden"; }; f ``` ### Problematic code in the case of `readonly`: