mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Skip checking if python is running when only doing package upgrades during python install. (#13995)
This commit is contained in:
@@ -151,6 +151,9 @@ export class ConfigurePathPage extends BasePage {
|
|||||||
|
|
||||||
this.model.pythonLocation = pythonLocation;
|
this.model.pythonLocation = pythonLocation;
|
||||||
this.model.useExistingPython = !!this.existingInstallButton.checked;
|
this.model.useExistingPython = !!this.existingInstallButton.checked;
|
||||||
|
this.model.packageUpgradeOnly = false;
|
||||||
|
} else {
|
||||||
|
this.model.packageUpgradeOnly = true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export interface ConfigurePythonModel {
|
|||||||
pythonPathLookup: PythonPathLookup;
|
pythonPathLookup: PythonPathLookup;
|
||||||
packagesToInstall: PythonPkgDetails[];
|
packagesToInstall: PythonPkgDetails[];
|
||||||
installation: JupyterServerInstallation;
|
installation: JupyterServerInstallation;
|
||||||
|
packageUpgradeOnly: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class ConfigurePythonWizard {
|
export class ConfigurePythonWizard {
|
||||||
@@ -164,7 +165,8 @@ export class ConfigurePythonWizard {
|
|||||||
let installSettings: PythonInstallSettings = {
|
let installSettings: PythonInstallSettings = {
|
||||||
installPath: pythonLocation,
|
installPath: pythonLocation,
|
||||||
existingPython: useExistingPython,
|
existingPython: useExistingPython,
|
||||||
packages: this.model.packagesToInstall
|
packages: this.model.packagesToInstall,
|
||||||
|
packageUpgradeOnly: this.model.packageUpgradeOnly
|
||||||
};
|
};
|
||||||
this.jupyterInstallation.startInstallProcess(false, installSettings)
|
this.jupyterInstallation.startInstallProcess(false, installSettings)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export interface PythonInstallSettings {
|
|||||||
installPath: string;
|
installPath: string;
|
||||||
existingPython: boolean;
|
existingPython: boolean;
|
||||||
packages: PythonPkgDetails[];
|
packages: PythonPkgDetails[];
|
||||||
|
packageUpgradeOnly?: boolean;
|
||||||
}
|
}
|
||||||
export interface IJupyterServerInstallation {
|
export interface IJupyterServerInstallation {
|
||||||
installCondaPackages(packages: PythonPkgDetails[], useMinVersion: boolean): Promise<void>;
|
installCondaPackages(packages: PythonPkgDetails[], useMinVersion: boolean): Promise<void>;
|
||||||
@@ -372,9 +373,9 @@ export class JupyterServerInstallation implements IJupyterServerInstallation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if Python is running before attempting to overwrite the installation.
|
// Check if Python is running before attempting to overwrite the installation.
|
||||||
// This step is skipped when using an existing installation, since we only add
|
// This step is skipped when using an existing installation or when upgrading
|
||||||
// extra packages in that case and don't modify the install itself.
|
// packages, since those cases wouldn't overwrite the installation.
|
||||||
if (!installSettings.existingPython) {
|
if (!installSettings.existingPython && !installSettings.packageUpgradeOnly) {
|
||||||
let pythonExePath = JupyterServerInstallation.getPythonExePath(installSettings.installPath, false);
|
let pythonExePath = JupyterServerInstallation.getPythonExePath(installSettings.installPath, false);
|
||||||
let isPythonRunning = await this.isPythonRunning(pythonExePath);
|
let isPythonRunning = await this.isPythonRunning(pythonExePath);
|
||||||
if (isPythonRunning) {
|
if (isPythonRunning) {
|
||||||
|
|||||||
Reference in New Issue
Block a user