Skip to content
  • Nikos Skalkotos's avatar
    Code cleanup · 995a47c9
    Nikos Skalkotos authored
    Make sure local variables are defined as local before they get assigned.
    Having variables get defined and assigned in one line like this:
    
    local var=foo
    
    can sometimes cause problems. For example, this line:
    
    local var=$(false)
    
    will return 0 and the script will not fail if set -x is defined.
    995a47c9