From 164d13a5d16a53148b7d444bece64626bacbfae6 Mon Sep 17 00:00:00 2001 From: Joey Robichaud Date: Thu, 25 Mar 2021 15:54:20 -0700 Subject: [PATCH] Add path to dotnet so child processes can use the CLI --- .vscode/launch.json | 1 - src/main.ts | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index d9c757b436..6d76ed8576 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -7,7 +7,6 @@ "request": "launch", "runtimeExecutable": "${execPath}", "args": [ - "--disable-extensions", "--extensionDevelopmentPath=${workspaceRoot}" ], "stopOnEntry": false, diff --git a/src/main.ts b/src/main.ts index 016cacbad1..46ec6738ea 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,7 @@ import * as OmniSharp from './omnisharp/extension'; import * as coreclrdebug from './coreclr-debug/activate'; import * as util from './common'; import * as vscode from 'vscode'; +import * as path from 'path'; import { ActivationFailure, ActiveTextEditorChanged } from './omnisharp/loggingEvents'; import { WarningMessageObserver } from './observers/WarningMessageObserver'; @@ -148,6 +149,8 @@ export async function activate(context: vscode.ExtensionContext): Promise reporter); eventStream.subscribe(telemetryObserver.post); @@ -227,3 +230,24 @@ async function ensureRuntimeDependencies(extension: vscode.Extension('dotnet-sdk.acquireStatus', request); + + return statusResult.dotnetPath?.length > 0; + } + catch { + } + } + + return false; +} \ No newline at end of file