Message ID | a445304594c6139770439c49cf18f10c6757cbab.1667934510.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | Accepted |
Commit | c90d81f8bb691b6627497e69d599e1f7fa7e9dfa |
Headers | show |
Series | chainlint: improve annotated output | expand |
diff --git a/t/chainlint.pl b/t/chainlint.pl index 976db4b8a01..9908de6c758 100755 --- a/t/chainlint.pl +++ b/t/chainlint.pl @@ -505,7 +505,11 @@ my @safe_endings = ( sub accumulate { my ($self, $tokens, $cmd) = @_; + + # no previous command to check for missing "&&" goto DONE unless @$tokens; + + # new command is empty line; can't yet check if previous is missing "&&" goto DONE if @$cmd == 1 && $$cmd[0] eq "\n"; # did previous command end with "&&", "|", "|| return" or similar?