Fix bug when symbolic ref fails
This commit is contained in:
parent
3e4ab24cbb
commit
fb48683668
2 changed files with 4 additions and 4 deletions
4
dist/src/create_pull_request.py
vendored
4
dist/src/create_pull_request.py
vendored
|
@ -114,8 +114,8 @@ repo = Repo(os.getcwd())
|
|||
# - HEAD is a tag
|
||||
try:
|
||||
working_base = repo.git.symbolic_ref("HEAD", "--short")
|
||||
except:
|
||||
print(f"::debug::{working_base}")
|
||||
except GitCommandError as e:
|
||||
print(f"::debug::{e.stderr}")
|
||||
print(
|
||||
f"::error::The checked out ref is not a valid base for a pull request. "
|
||||
+ "Unable to continue. Exiting."
|
||||
|
|
|
@ -114,8 +114,8 @@ repo = Repo(os.getcwd())
|
|||
# - HEAD is a tag
|
||||
try:
|
||||
working_base = repo.git.symbolic_ref("HEAD", "--short")
|
||||
except:
|
||||
print(f"::debug::{working_base}")
|
||||
except GitCommandError as e:
|
||||
print(f"::debug::{e.stderr}")
|
||||
print(
|
||||
f"::error::The checked out ref is not a valid base for a pull request. "
|
||||
+ "Unable to continue. Exiting."
|
||||
|
|
Loading…
Reference in a new issue