diff --git a/src/lib/sf-cli.ts b/src/lib/sf-cli.ts index 3879bd7..f8f980d 100644 --- a/src/lib/sf-cli.ts +++ b/src/lib/sf-cli.ts @@ -20,10 +20,16 @@ export class SfCli { const cp = cspawn.spawn('sf', ['-v']); cp.on('close', code => { + console.log(`isSfCliInstalled got close event, code is ${code}`); // If the exit code is 0, then SF or SFDX is present. // Otherwise, it's not. res(code === 0); }); + + cp.on('exit', code => { + console.log(`isSfCliInstalled got exit event, code is ${code}`); + res(code === 0); + }) }); }