mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-18 02:20:09 +00:00
fix(dependencies): check if repo is clean before committing
This commit is contained in:
parent
1d31ff6037
commit
0493eab8ce
1 changed files with 21 additions and 15 deletions
6
.github/workflows/dependencies/updater.py
vendored
6
.github/workflows/dependencies/updater.py
vendored
|
@ -390,6 +390,12 @@ class Git:
|
|||
clean_env["GIT_CONFIG_GLOBAL"] = "/dev/null"
|
||||
clean_env["GIT_CONFIG_NOSYSTEM"] = "1"
|
||||
|
||||
# check if repo is clean (clean => no error, no commit)
|
||||
try:
|
||||
CommandRunner.run_or_fail(
|
||||
["git", "diff", "--exit-code"], stage="CheckRepoClean", env=clean_env
|
||||
)
|
||||
except CommandRunner.Exception:
|
||||
# Commit with settings above
|
||||
CommandRunner.run_or_fail(
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue