Skip to content

Commit

Permalink
[osh/cmd_exec] Fix bug in recent commit.
Browse files Browse the repository at this point in the history
Caught by flake8 :-(
  • Loading branch information
Andy Chu committed Jul 6, 2019
1 parent c270d7d commit 408cf3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion osh/cmd_exec.py
Expand Up @@ -858,10 +858,10 @@ def _Dispatch(self, node, fork_external):
else:
raise _ControlFlow(tok, arg)
else:
msg = 'Invalid control flow at top level'
if self.exec_opts.strict_control_flow:
e_die(msg, token=tok)
else:
msg = 'Invalid control flow at top level'
# Only print warnings, never fatal.
# Bash oddly only exits 1 for 'return', but no other shell does.
self.errfmt.Print(msg, prefix='warning: ', span_id=tok.span_id)
Expand Down

0 comments on commit 408cf3b

Please sign in to comment.