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 dfe46e8
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 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 @@ -33,9 +31,7 @@ def start_openadapt_app() -> None:

if changes_needed(result.stdout):
subprocess.run(["git", "stash"])
print("Changes stashed")

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

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

0 comments on commit dfe46e8

Please sign in to comment.