From b161699a810e8575a1a6783fd3b0d1527d75c5bd Mon Sep 17 00:00:00 2001 From: paulacamargo25 Date: Wed, 21 Jun 2023 10:27:54 -0700 Subject: [PATCH] Fix error checking python version (#30) --- src/extension/debugger/adapter/factory.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/extension/debugger/adapter/factory.ts b/src/extension/debugger/adapter/factory.ts index 97f38637..842780b9 100644 --- a/src/extension/debugger/adapter/factory.ts +++ b/src/extension/debugger/adapter/factory.ts @@ -175,7 +175,10 @@ export class DebugAdapterDescriptorFactory implements IDebugAdapterDescriptorFac private async getExecutableCommand(interpreter: Environment | undefined): Promise { if (interpreter) { - if ((interpreter.version?.major ?? 0) < 3 || (interpreter.version?.minor ?? 0) <= 6) { + if ( + (interpreter.version?.major ?? 0) < 3 || + ((interpreter.version?.major ?? 0) <= 3 && (interpreter.version?.minor ?? 0) <= 6) + ) { this.showDeprecatedPythonMessage(); } return interpreter.path.length > 0 ? [interpreter.path] : [];