-
Notifications
You must be signed in to change notification settings - Fork 440
Closed
Labels
Priority: CriticalBroken behavior in nearly all environments, e.g. wrong test results, internal bats errorBroken behavior in nearly all environments, e.g. wrong test results, internal bats errorType: QuestionWaiting for Contributor FeedbackThe original contributor did not yet respond to the latest requestThe original contributor did not yet respond to the latest requesthelp wanted
Milestone
Description
After landing #367 and rebasing #477 onto it, I got a host of shellcheck warnings for the new run =<N>
syntax along the lines of:
run =0 true
^-- SC2283: Remove spaces around = to assign (or use [ ] to compare, or quote '=' if literal).
My decision to use =
was that it is concise and I wanted to avoid run '=0'
. However, seeing this warning made me acutely aware of the ramifications. Missing the space would assign run=0
and works without error because the next part is a command that should be runnable.
I see following ways going forward:
- expect
run '=0'
- find another syntax for the return code check (I checked
run ?0
andrun ==0
, which also give shellcheck warnings but at least would not fail silently when omitting the space) - stay with
run =0
and update shellcheck to balk atrun=0
and don't balk atrun =0
in bats tests
Pinging @edsantiago since you floated other ideas in the original PR.
I am giving this some urgency since I want to settle the issue before run =<N>
gets published in the next release.
Metadata
Metadata
Assignees
Labels
Priority: CriticalBroken behavior in nearly all environments, e.g. wrong test results, internal bats errorBroken behavior in nearly all environments, e.g. wrong test results, internal bats errorType: QuestionWaiting for Contributor FeedbackThe original contributor did not yet respond to the latest requestThe original contributor did not yet respond to the latest requesthelp wanted