mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-27 23:30:30 -04:00
Fix bugs in selecting a system version of Python for Notebook dependencies (#6250)
This commit is contained in:
@@ -118,7 +118,18 @@ export class LocalJupyterServerManager implements nb.ServerManager, vscode.Dispo
|
||||
// /path2/nb3.ipynb
|
||||
// ... will result in 2 notebook servers being started, one for /path1/ and one for /path2/
|
||||
let notebookDir = this.apiWrapper.getWorkspacePathFromUri(vscode.Uri.file(this.documentPath));
|
||||
notebookDir = notebookDir || path.dirname(this.documentPath);
|
||||
if (!notebookDir) {
|
||||
let docDir = path.dirname(this.documentPath);
|
||||
if (docDir === '.') {
|
||||
// If the user is using a system version of python, then
|
||||
// '.' will try to create a notebook in a system directory.
|
||||
// Since this will fail due to permissions, use the user's
|
||||
// home folder instead.
|
||||
notebookDir = utils.getUserHome();
|
||||
} else {
|
||||
notebookDir = docDir;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO handle notification of start/stop status
|
||||
// notebookContext.updateLoadingMessage(localizedConstants.msgJupyterStarting);
|
||||
|
||||
Reference in New Issue
Block a user