From ace02bbf665f06cad2350b9166e49a8931b1a1dd Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Fri, 19 Mar 2021 10:08:50 -0700 Subject: [PATCH] Misc changes --- .../datascience/kernel-launcher/localKernelFinder.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/client/datascience/kernel-launcher/localKernelFinder.ts b/src/client/datascience/kernel-launcher/localKernelFinder.ts index b132b5256cc..f1667938059 100644 --- a/src/client/datascience/kernel-launcher/localKernelFinder.ts +++ b/src/client/datascience/kernel-launcher/localKernelFinder.ts @@ -32,7 +32,7 @@ import { } from '../jupyter/kernels/types'; import { IJupyterKernelSpec } from '../types'; import { ILocalKernelFinder } from './types'; -import { tryGetRealPath } from '../common'; +import { getResourceType, tryGetRealPath } from '../common'; import { isPythonNotebook } from '../notebook/helpers/helpers'; const winJupyterPath = path.join('AppData', 'Roaming', 'jupyter', 'kernels'); @@ -91,13 +91,14 @@ export class LocalKernelFinder implements ILocalKernelFinder { try { // Get list of all of the specs const kernels = await this.listKernels(resource, cancelToken); - const isPythonNb = isPythonNotebook(option); + const isPythonNbOrInteractiveWindow = + isPythonNotebook(option) || getResourceType(resource) === 'interactive'; // Always include the interpreter in the search if we can const interpreter = option && isInterpreter(option) ? option - : resource && isPythonNb && this.extensionChecker.isPythonExtensionInstalled + : resource && isPythonNbOrInteractiveWindow && this.extensionChecker.isPythonExtensionInstalled ? await this.interpreterService.getActiveInterpreter(resource) : undefined;