Skip to content

Commit

Permalink
Don't error during uploading if the package already exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Hofer-Julian committed Nov 21, 2024
1 parent 832c5cd commit 468c596
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ def main() -> None:
]
result = run_command_unchecked(command)
if result.returncode != 0:
eprint(f"Error uploading {conda_file}: {result.stderr}")
exit_code = 1
if "409 Conflict" in result.stderr:
eprint(f"Package {conda_file} already exists upstream.")
else:
eprint(f"Error uploading {conda_file}: {result.stderr}")
exit_code = 1

sys.exit(exit_code)

Expand Down

0 comments on commit 468c596

Please sign in to comment.