]> Git Repo - pico-vscode.git/blob - src/commands/getPaths.mts
Fix compile project concurrency
[pico-vscode.git] / src / commands / getPaths.mts
1 import { CommandWithResult } from "./command.mjs";
2 import { workspace } from "vscode";
3 import { getPythonPath, getPath } from "../utils/cmakeUtil.mjs";
4
5 export class GetPythonPathCommand
6                       extends CommandWithResult<string> {
7   constructor() {
8     super("getPythonPath");
9   }
10
11   async execute(): Promise<string> {
12     if (
13       workspace.workspaceFolders === undefined ||
14       workspace.workspaceFolders.length === 0
15     ) {
16       return "";
17     }
18
19     const pythonPath = await getPythonPath();
20
21     return pythonPath;
22   }
23 }
24
25 export class GetEnvPathCommand
26                       extends CommandWithResult<string> {
27   constructor() {
28     super("getEnvPath");
29   }
30
31   async execute(): Promise<string> {
32     if (
33       workspace.workspaceFolders === undefined ||
34       workspace.workspaceFolders.length === 0
35     ) {
36       return "";
37     }
38
39     const path = await getPath();
40
41     return path;
42   }
43 }
This page took 0.030568 seconds and 4 git commands to generate.