mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 11:19:45 +08:00
Updated SC2155 (markdown)
@@ -21,3 +21,5 @@ If you intend to ignore the return value of an assignment, you can either ignore
|
||||
|
||||
export foo
|
||||
foo=$(mycmd) || true
|
||||
|
||||
Shellcheck does not warn about `export foo=bar` because `bar` is a literal and not a command substitution with an independent return value. It also does not warn about `local -r foo=$(cmd)`, where declaration and assignment must be in the same command.
|
Reference in New Issue
Block a user