File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,21 @@ const ATTESTATION_FILE_NAME = 'attestation.jsonl'
1919
2020const MAX_SUBJECT_COUNT = 64
2121
22+ /* istanbul ignore next */
23+ const logHandler = ( level : string , ...args : unknown [ ] ) : void => {
24+ // Send any HTTP-related log events to the GitHub Actions debug log
25+ if ( level === 'http' ) {
26+ core . debug ( args . join ( ' ' ) )
27+ }
28+ }
29+
2230/**
2331 * The main function for the action.
2432 * @returns {Promise<void> } Resolves when the action is complete.
2533 */
2634export async function run ( ) : Promise < void > {
35+ process . on ( 'log' , logHandler )
36+
2737 // Provenance visibility will be public ONLY if we can confirm that the
2838 // repository is public AND the undocumented "private-signing" arg is NOT set.
2939 // Otherwise, it will be private.
@@ -98,6 +108,8 @@ export async function run(): Promise<void> {
98108 mute ( innerErr instanceof Error ? innerErr . toString ( ) : `${ innerErr } ` )
99109 )
100110 }
111+ } finally {
112+ process . removeListener ( 'log' , logHandler )
101113 }
102114}
103115
You can’t perform that action at this time.
0 commit comments