Skip to content

Commit f01eceb

Browse files
authored
Send Sigstore CLI verification to stdout, not stderr (#193)
1 parent 4c00245 commit f01eceb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

add_to_pydotorg.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,13 +422,23 @@ def has_sigstore_signature(filename: str) -> bool:
422422
filename_sigstore = filename + ".sigstore"
423423

424424
if os.path.exists(filename_sigstore):
425-
run_cmd(sigstore_verify_argv + ["--bundle", filename_sigstore, filename])
425+
run_cmd(
426+
sigstore_verify_argv + ["--bundle", filename_sigstore, filename],
427+
stderr=subprocess.STDOUT, # Sigstore sends stderr on success.
428+
)
426429

427430
# We use an 'or' here to error out if one of the files is missing.
428431
if os.path.exists(filename_sig) or os.path.exists(filename_crt):
429432
run_cmd(
430433
sigstore_verify_argv
431-
+ ["--certificate", filename_crt, "--signature", filename_sig, filename]
434+
+ [
435+
"--certificate",
436+
filename_crt,
437+
"--signature",
438+
filename_sig,
439+
filename,
440+
],
441+
stderr=subprocess.STDOUT, # Sigstore sends stderr on success.
432442
)
433443

434444

0 commit comments

Comments
 (0)