diff --git a/salt/hg/files/hg/src/hgrev.py b/salt/hg/files/hg/src/hgrev.py index 36599e65..b00e97ba 100644 --- a/salt/hg/files/hg/src/hgrev.py +++ b/salt/hg/files/hg/src/hgrev.py @@ -43,7 +43,12 @@ def __call__(self, env, response): try: result = subprocess.run( - command, cwd=hg_repo, capture_output=True, text=True, shell=False + command, + cwd=hg_repo, + capture_output=True, + text=True, + shell=False, + check=True ) except Exception as e: return self.failed_response(response, detail=str(e))