Skip to content

Commit

Permalink
Merge pull request #47544 from KaiSforza/multicommandexit
Browse files Browse the repository at this point in the history
Multi-command salt calls return highest exit
  • Loading branch information
Erik Johnson committed Jun 1, 2018
2 parents b6795af + 767245c commit 7fb420c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions salt/cli/salt.py
Expand Up @@ -401,6 +401,8 @@ def _get_retcode(self, ret):
retcode = 0
# if there is a dict with retcode, use that
if isinstance(ret, dict) and ret.get('retcode', 0) != 0:
if isinstance(ret.get('retcode', 0), dict):
return max(ret.get('retcode', {0: 0}).values())
return ret['retcode']
# if its a boolean, False means 1
elif isinstance(ret, bool) and not ret:
Expand Down

0 comments on commit 7fb420c

Please sign in to comment.