Skip to content

Commit

Permalink
chore: more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed Jun 3, 2024
1 parent 1340597 commit bc8eda4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/commands/cli/tarballs/smoke.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,18 @@ export default class SmokeTest extends SfCommand<void> {
}

private async getAllCommands(executable: string): Promise<string[]> {
const commandsJson = JSON.parse(await this.execute(executable, 'commands --json', false)) as Array<{ id: string }>;
return commandsJson.map((c) => c.id);
try {
const commandsJson = JSON.parse(await this.execute(executable, 'commands --json', false)) as Array<{
id: string;
}>;
return commandsJson.map((c) => c.id);
} catch (error) {
// eslint-disable-next-line no-console
console.log('Failed to get all commands');
// eslint-disable-next-line no-console
console.log(error);
throw error;
}
}

private async nonVerboseCommandExecution(executable: string, command: string): Promise<void> {
Expand All @@ -131,7 +141,7 @@ export default class SmokeTest extends SfCommand<void> {
const { stdout } = await exec(command, { maxBuffer: 1024 * 1024 * 100 });
if (!silent) {
this.styledHeader(command);
this.log(stdout);
this.log(stripAnsi(stdout));
}
return stripAnsi(stdout);
} catch (e) {
Expand Down

0 comments on commit bc8eda4

Please sign in to comment.