You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From e.g. the Google Shell Style Guide [1]:
Ensure that local variables are only seen inside a function and its
children by using `local` when declaring them. This avoids polluting
the global name space and inadvertently setting variables that may
have significance outside the function.
Declaration and assignment must be separate statements when the
assignment value is provided by a command substitution; as the
`local` builtin does not propagate the exit code from the command
substitution.
[1] https://google.github.io/styleguide/shellguide.html#use-local-variablesexercism/configlet#691
0 commit comments