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 18, 2020
1 parent 920600b commit 3edd280
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 @@ -18,6 +18,7 @@ import { execute } from './exec';
import * as git from './git';

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

/**
* Enumeration ID's of ide actions.
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(`--ca-certificate=${SS_CRT_PATH}`);
}
await execute('wget', wgetArgs);

// expand
Expand Down

0 comments on commit 3edd280

Please sign in to comment.