diff --git a/SC2310.md b/SC2310.md index 94af051..5be145f 100644 --- a/SC2310.md +++ b/SC2310.md @@ -42,7 +42,7 @@ echo "Backup successful" ShellCheck found a function used as a condition in a script where `set -e` is enabled. This means that the function will run without `set -e`, and will power through any errors. -This applies to `if`, `while`, and `until` statements, commands negated with `!`, as well as the left-hand side of `||` and `&&`. It does matter how deeply the command is nested in such a structure. +This applies to `if`, `while`, and `until` statements, commands negated with `!`, as well as the left-hand side of `||` and `&&`. It does not matter how deeply the command is nested in such a structure. In the problematic example, the intent was that an error like `cp: error writing '/backup/important.txt': No space left on device` would cause the script to abort. Instead, since the function is invoked in an `if` statement, the script will proceed to delete all the files even though it failed to back them up.