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

Fix import of zip project in case the archive is hosted on the same cluster which uses self-signed certificate #672

Merged
merged 4 commits into from
Mar 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 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 @@ -203,8 +204,12 @@ export class TheiaImportZipCommand implements TheiaImportCommand {
const importZip = async (progress: theia.Progress<{ message?: string; increment?: number }>, token: theia.CancellationToken): Promise<void> => {
try {
// download
const wgetArgs = [this.locationURI!, '-O', this.zipfilePath];
await execute('wget', wgetArgs);
const curlArgs = ['-sSL', '--output', this.zipfilePath];
if (fs.existsSync(SS_CRT_PATH)) {
davidfestal marked this conversation as resolved.
Show resolved Hide resolved
curlArgs.push('-k');
}
curlArgs.push(this.locationURI!);
await execute('curl', curlArgs);

// expand
fs.mkdirSync(this.projectDir);
Expand Down