Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dianzrong committed Jun 21, 2023
1 parent 754c921 commit e3178fe
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions openadapt/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ def changes_needed(result: str) -> bool:
"""
if "Changes to be committed:" in result:
return True
if "Changes not staged for commit:" in result:
return True
if "Your branch is ahead of" in result:
elif "Changes not staged for commit:" in result:
return True
return False

Expand All @@ -35,8 +33,7 @@ def start_openadapt_app() -> None:
subprocess.run(["git", "stash"])
print("Changes stashed")

print("please fix merge commits and ")
elif "branch is up to date" not in result.stdout:
if "git pull" in result.stdout:
pull_result = subprocess.run(["git", "pull", "-q"])
if "diverged" in pull_result.stdout:
print("Please fix merge conflicts and try again")
Expand All @@ -48,4 +45,4 @@ def start_openadapt_app() -> None:

if __name__ == "__main__":
start_openadapt_app()
logger.info("updated")

0 comments on commit e3178fe

Please sign in to comment.