Skip to content

Commit

Permalink
Fix Certificate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kishorikumar committed Sep 12, 2022
1 parent 1905fbb commit 9da3668
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -685,8 +685,10 @@ function runWithPolicyCheck(blackduckPolicyCheck) {
(0, core_1.info)(`detect-version: ${inputs_1.DETECT_VERSION}`);
(0, core_1.info)(`output-path-override: ${inputs_1.OUTPUT_PATH_OVERRIDE}`);
(0, core_1.info)(`scan-mode: ${inputs_1.SCAN_MODE}`);
//Setting process environment for SSL certificate issue fix
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
//Setting process environment for certificate issue fix
if (!process.env['NODE_TLS_REJECT_UNAUTHORIZED']) {
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
}
const runnerTemp = process.env.RUNNER_TEMP;
let outputPath = '';
if (inputs_1.OUTPUT_PATH_OVERRIDE !== '') {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ export async function runWithPolicyCheck(blackduckPolicyCheck: GitHubCheck): Pro
info(`scan-mode: ${SCAN_MODE}`)

//Setting process environment for certificate issue fix
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'
if (!process.env['NODE_TLS_REJECT_UNAUTHORIZED']) {
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'
}

const runnerTemp = process.env.RUNNER_TEMP
let outputPath = ''
Expand Down

0 comments on commit 9da3668

Please sign in to comment.