Skip to content

Commit

Permalink
Add a workaround for the "dubious ownership" error
Browse files Browse the repository at this point in the history
  • Loading branch information
mini-bomba committed Feb 3, 2023
1 parent 0e5d3fe commit 0fd8b05
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ def run_command(cmd: list[str], end_group: bool = False):
exit(1)
tag_name = os.environ['INPUT_TAG']

# A workaround for the "dubious ownership" error
print('::debug::😩 Attempting a workaround for the "dubious ownership" git error')
run_command(["git", "config", "--global", "--add", "safe.directory", "/github/workspace"])

if check_input("TARGET_COMMIT"):
target_commit = os.environ['INPUT_TARGET_COMMIT']
proc = subprocess.Popen(['git', 'rev-parse', target_commit], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Expand Down

0 comments on commit 0fd8b05

Please sign in to comment.