Skip to content

More logging #16552

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
40 changes: 30 additions & 10 deletions src/kernels/raw/finder/jupyterPaths.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,37 @@ export class JupyterPaths {
return cachedRootPath || this.cachedKernelSpecRootPath;
}
this.cachedKernelSpecRootPath = (async () => {
const userHomeDir = this.platformService.homeDir;
if (userHomeDir) {
if (this.platformService.isWindows) {
// On windows the path is not correct if we combine those variables.
// It won't point to a path that you can actually read from.
return tryGetRealPath(uriPath.joinPath(userHomeDir, winJupyterPath));
} else if (this.platformService.isMac) {
return uriPath.joinPath(userHomeDir, macJupyterPath);
} else {
return uriPath.joinPath(userHomeDir, linuxJupyterPath);
try {
const userHomeDir = this.platformService.homeDir;
logger.trace(`User Home Dir`, userHomeDir?.toString());
logger.trace(`is is Windows`, this.platformService.isWindows);
logger.trace(`is is Mac`, this.platformService.isMac);
if (userHomeDir) {
if (this.platformService.isWindows) {
logger.trace(
`Get real Win Jupyter Path`,
uriPath.joinPath(userHomeDir, winJupyterPath).toString()
);
// On windows the path is not correct if we combine those variables.
// It won't point to a path that you can actually read from.
return await tryGetRealPath(uriPath.joinPath(userHomeDir, winJupyterPath));
} else if (this.platformService.isMac) {
logger.trace(
`Get real Mac Jupyter Path`,
uriPath.joinPath(userHomeDir, macJupyterPath).toString()
);
return uriPath.joinPath(userHomeDir, macJupyterPath);
} else {
logger.trace(
`Get real Linux Jupyter Path`,
uriPath.joinPath(userHomeDir, linuxJupyterPath).toString()
);
return uriPath.joinPath(userHomeDir, linuxJupyterPath);
}
}
} catch (ex) {
logger.error(`Failed to get Jupyter KernelSpec Root Path`, ex);
throw ex;
}
})();
this.cachedKernelSpecRootPath
Expand Down