Skip to content

Commit

Permalink
Helpful output
Browse files Browse the repository at this point in the history
  • Loading branch information
aBozowski committed Jun 1, 2022
1 parent 0a1de0a commit ccc6564
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/chef/chef.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,15 @@ def check_zap(master=False) -> str:
"""
shell.run_cmd(f"cd {_REPO_BASE_PATH}")
if master:
flush_print("Fetching master")
shell.run_cmd(f"git fetch origin master")
branch = "master"
else:
branch = shell.run_cmd("git rev-parse --abbrev-ref HEAD",
return_cmd_output=True).replace("\n", "")
command = f"git ls-tree {branch} third_party/zap/repo"
zap_commit = shell.run_cmd(command, return_cmd_output=True)
flush_print(f"Raw zap commit {zap_commit}")
zap_commit = zap_commit.split(" ")[2]
zap_commit = zap_commit[:zap_commit.index("\t")]
flush_print(f"zap commit: {zap_commit}")
Expand Down

0 comments on commit ccc6564

Please sign in to comment.