Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Commit

Permalink
Fix import of zip project in case the archive is hosted on the same c…
Browse files Browse the repository at this point in the history
…luster which uses self-signed certificate

Signed-off-by: Mykola Morhun <mmorhun@redhat.com>
  • Loading branch information
mmorhun committed Mar 19, 2020
1 parent c393f53 commit 01b3153
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/workspace-plugin/src/theia-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import * as fileuri from './file-uri';
import { execute } from './exec';
import * as git from './git';

const SS_CRT_PATH = '/tmp/che/secret/ca.crt';
const CHE_TASK_TYPE = 'che';

/**
Expand Down Expand Up @@ -204,6 +205,9 @@ export class TheiaImportZipCommand implements TheiaImportCommand {
try {
// download
const wgetArgs = [this.locationURI!, '-O', this.zipfilePath];
if (fs.existsSync(SS_CRT_PATH)) {
wgetArgs.push('--no-check-certificate');
}
await execute('wget', wgetArgs);

// expand
Expand Down

0 comments on commit 01b3153

Please sign in to comment.