Fix bug when symbolic ref fails
This commit is contained in:
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
|
# - HEAD is a tag
|
||||||
try:
|
try:
|
||||||
working_base = repo.git.symbolic_ref("HEAD", "--short")
|
working_base = repo.git.symbolic_ref("HEAD", "--short")
|
||||||
except:
|
except GitCommandError as e:
|
||||||
print(f"::debug::{working_base}")
|
print(f"::debug::{e.stderr}")
|
||||||
print(
|
print(
|
||||||
f"::error::The checked out ref is not a valid base for a pull request. "
|
f"::error::The checked out ref is not a valid base for a pull request. "
|
||||||
+ "Unable to continue. Exiting."
|
+ "Unable to continue. Exiting."
|
||||||
|
@@ -114,8 +114,8 @@ repo = Repo(os.getcwd())
|
|||||||
# - HEAD is a tag
|
# - HEAD is a tag
|
||||||
try:
|
try:
|
||||||
working_base = repo.git.symbolic_ref("HEAD", "--short")
|
working_base = repo.git.symbolic_ref("HEAD", "--short")
|
||||||
except:
|
except GitCommandError as e:
|
||||||
print(f"::debug::{working_base}")
|
print(f"::debug::{e.stderr}")
|
||||||
print(
|
print(
|
||||||
f"::error::The checked out ref is not a valid base for a pull request. "
|
f"::error::The checked out ref is not a valid base for a pull request. "
|
||||||
+ "Unable to continue. Exiting."
|
+ "Unable to continue. Exiting."
|
||||||
|
Reference in New Issue
Block a user