Remove decompress (#9530)

This commit is contained in:
Chris LaFreniere
2020-03-10 13:21:51 -07:00
committed by GitHub
parent b02273de48
commit 268463b5c7
3 changed files with 23 additions and 298 deletions

View File

@@ -8,7 +8,7 @@ import * as path from 'path';
import * as nls from 'vscode-nls';
import * as azdata from 'azdata';
import { ExecOptions } from 'child_process';
import * as decompress from 'decompress';
// import * as decompress from 'decompress';
import * as request from 'request';
import { ApiWrapper } from '../common/apiWrapper';
@@ -22,7 +22,7 @@ import CodeAdapter from '../prompts/adapter';
const localize = nls.loadMessageBundle();
const msgInstallPkgProgress = localize('msgInstallPkgProgress', "Notebook dependencies installation is in progress");
const msgPythonDownloadComplete = localize('msgPythonDownloadComplete', "Python download is complete");
// const msgPythonDownloadComplete = localize('msgPythonDownloadComplete', "Python download is complete");
const msgPythonDownloadError = localize('msgPythonDownloadError', "Error while downloading python setup");
const msgPythonDownloadPending = localize('msgPythonDownloadPending', "Downloading python package");
const msgPythonUnpackPending = localize('msgPythonUnpackPending', "Unpacking python package");
@@ -229,22 +229,22 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
return reject(err);
}
}
decompress(pythonPackagePathLocal, installPath).then(files => {
//Delete zip/tar file
fs.unlink(pythonPackagePathLocal, (err) => {
if (err) {
backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonUnpackError);
reject(err);
}
});
// decompress(pythonPackagePathLocal, installPath).then(files => {
// //Delete zip/tar file
// fs.unlink(pythonPackagePathLocal, (err) => {
// if (err) {
// backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonUnpackError);
// reject(err);
// }
// });
outputChannel.appendLine(msgPythonDownloadComplete);
backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonDownloadComplete);
resolve();
}).catch(err => {
backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonUnpackError);
reject(err);
});
// outputChannel.appendLine(msgPythonDownloadComplete);
// backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonDownloadComplete);
// resolve();
// }).catch(err => {
// backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonUnpackError);
// reject(err);
// });
})
.on('error', (downloadError) => {
backgroundOperation.updateStatus(azdata.TaskStatus.InProgress, msgPythonDownloadError);