Exposed version from the CLI.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2019-10-08 10:14:05 +02:00
parent de1caf1451
commit 1dda5dd95b

View File

@ -26,6 +26,11 @@ export class ArduinoCli {
}); });
} }
async getVersion(): Promise<string> {
const execPath = await this.getExecPath();
return cp.execFileSync(`${execPath}`, ['version']).toString().trim();
}
async getDefaultConfig(): Promise<Config> { async getDefaultConfig(): Promise<Config> {
const command = await this.getExecPath(); const command = await this.getExecPath();
return new Promise<Config>((resolve, reject) => { return new Promise<Config>((resolve, reject) => {