Skip to content

Commit

Permalink
Remove error from commit if tree is clean
Browse files Browse the repository at this point in the history
  • Loading branch information
goFrendiAsgard committed Nov 29, 2024
1 parent 3fc70b6 commit 7bfe5f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/zrb/util/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ def commit(repo_dir: str, message: str) -> str:
check=True,
)
except subprocess.CalledProcessError as e:
raise Exception(e.stderr or e.stdout)
if "nothing to commit, working tree clean" not in e.stderr:
raise Exception(e.stderr or e.stdout)


def pull(repo_dir: str, remote: str, branch: str) -> str:
Expand Down

0 comments on commit 7bfe5f2

Please sign in to comment.