Skip to content

Commit 6b606b7

Browse files
Update tools/chelon-sign
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c828539 commit 6b606b7

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tools/chelon-sign

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,12 @@ def sign_file_detached(file_path: str, output_path: Optional[str] = None,
283283
client = get_client()
284284
response = client.sign_file(str(target_file), key_type=key_type, operation=operation)
285285

286-
with open(output_path, 'w') as f:
287-
f.write(response['signature'])
286+
try:
287+
with open(output_path, 'w') as f:
288+
f.write(response['signature'])
289+
except OSError as e:
290+
print(f"Error writing signature to '{output_path}': {e}", file=sys.stderr)
291+
sys.exit(1)
288292

289293
if verbose:
290294
print(f"✓ Signed successfully")

0 commit comments

Comments
 (0)