]> Git Repo - pico-vscode.git/blob - src/commands/getToolchainPath.mts
Add `getSDKPath`, `getToolchainPath` and `switchSDK` commands
[pico-vscode.git] / src / commands / getToolchainPath.mts
1 import type Settings from "../settings.mjs";
2 import { getSDKAndToolchainPath } from "../utils/picoSDKUtil.mjs";
3 import { CommandWithResult } from "./command.mjs";
4
5 export default class GetToolchainPathCommand extends CommandWithResult<string> {
6   private _settings: Settings;
7
8   constructor(settings: Settings) {
9     super("getToolchainPath");
10
11     this._settings = settings;
12   }
13
14   async execute(): Promise<string> {
15     const [, toolchainPath] =
16       (await getSDKAndToolchainPath(this._settings)) ?? [];
17
18     return toolchainPath ?? "";
19   }
20 }
This page took 0.027709 seconds and 4 git commands to generate.