()
| 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> { |