mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Changes to use bundled python package (#12967)
* Set python path in kernel specs when running on SAW devices. * Use tab spacer for kernel json. * Update path to jupyter kernelspec. * removing the kernelspec write * Changed powershell kernel.json to use appdata folder * Addressed PR and added try catches around the code. * removed redundant try catch * removed redundant try catch * removed another try catch * removed space Co-authored-by: Cory Rivera <corivera@microsoft.com>
This commit is contained in:
@@ -174,12 +174,20 @@ export class PerFolderServerInstance implements IServerInstance {
|
||||
}
|
||||
|
||||
private async copyKernelsToSystemJupyterDirs(): Promise<void> {
|
||||
let kernelsExtensionSource = path.join(this.options.install.extensionPath, 'kernels');
|
||||
let kernelsExtensionSource: string;
|
||||
if (this.options.install.runningOnSaw) {
|
||||
kernelsExtensionSource = path.join(this.options.install.extensionPath, 'saw-kernels');
|
||||
} else {
|
||||
kernelsExtensionSource = path.join(this.options.install.extensionPath, 'kernels');
|
||||
}
|
||||
this._systemJupyterDir = path.join(this.getSystemJupyterHomeDir(), 'kernels');
|
||||
if (!(await utils.exists(this._systemJupyterDir))) {
|
||||
await utils.mkDir(this._systemJupyterDir, this.options.install.outputChannel);
|
||||
}
|
||||
await fs.copy(kernelsExtensionSource, this._systemJupyterDir);
|
||||
if (this.options.install.runningOnSaw) {
|
||||
await this.options.install.updateKernelSpecPaths(this._systemJupyterDir);
|
||||
}
|
||||
}
|
||||
|
||||
private getSystemJupyterHomeDir(): string {
|
||||
|
||||
Reference in New Issue
Block a user