Clarify wording of demo error message

Dan Griscom
2024-01-07 10:16:11 -05:00
parent eb05628528
commit 4de7cb89ef

@@ -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: The exit status of the command is overridden by the exit status of the creation of the local variable. For example:
```bash ```bash
$ f() { local foo=$(false) && echo "silent error happened"; }; f $ f() { local foo=$(false) && echo "error was hidden"; }; f
silent error happened error was hidden
$ f() { local foo; foo=$(false) && echo "silent error happened"; }; f $ f() { local foo; foo=$(false) && echo "error was hidden"; }; f
``` ```
### Problematic code in the case of `readonly`: ### Problematic code in the case of `readonly`: