MCPcopy
hub / github.com/PowerShell/vscode-powershell / getVersionCli

Method getVersionCli

src/process.ts:194–203  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192
193 // This function should only be used after a failure has occurred because it is slow!
194 public async getVersionCli(): Promise<string> {
195 const exec = promisify(cp.execFile);
196 const { stdout } = await exec(this.exePath, [
197 "-NoProfile",
198 "-NoLogo",
199 "-Command",
200 "$PSVersionTable.PSVersion.ToString()",
201 ]);
202 return stdout.trim();
203 }
204
205 // Returns the process Id of the consoleTerminal
206 public async getPid(): Promise<number | undefined> {

Callers 1

handleFailedProcessMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected