Skip to content

Commit a84de01

Browse files
committed
Better download logging
1 parent 7dcbd50 commit a84de01

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tool.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,16 @@ export async function downloadTool(url: string, fileName?: string): Promise<stri
247247
})
248248
}
249249
catch (error) {
250+
if (error.code){
251+
// Print the HTTP Error code. These are always set when
252+
// there is a proxy problem. Two usual suspects are:
253+
// UNABLE_TO_VERIFY_LEAF_SIGNATURE: True when your proxy
254+
// is expressing a self signed cert or when you need
255+
// to trust the root CA from your proxy.
256+
// UNABLE_TO_GET_ISSUER_CERT_LOCALLY: Seems to be set
257+
// when you haven't trusted intermediate CA of your proxy.
258+
tl.error(`Error code is(${error.code})`)
259+
}
250260
reject(error);
251261
}
252262
});
@@ -486,7 +496,7 @@ function _createExtractFolder(dest?: string): string {
486496
}
487497

488498
tl.mkdirP(dest);
489-
499+
490500
return dest;
491501
}
492502

0 commit comments

Comments
 (0)