Skip to content

Commit bc8eda4

Browse files
committed
chore: more debugging
1 parent 1340597 commit bc8eda4

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/commands/cli/tarballs/smoke.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,18 @@ export default class SmokeTest extends SfCommand<void> {
111111
}
112112

113113
private async getAllCommands(executable: string): Promise<string[]> {
114-
const commandsJson = JSON.parse(await this.execute(executable, 'commands --json', false)) as Array<{ id: string }>;
115-
return commandsJson.map((c) => c.id);
114+
try {
115+
const commandsJson = JSON.parse(await this.execute(executable, 'commands --json', false)) as Array<{
116+
id: string;
117+
}>;
118+
return commandsJson.map((c) => c.id);
119+
} catch (error) {
120+
// eslint-disable-next-line no-console
121+
console.log('Failed to get all commands');
122+
// eslint-disable-next-line no-console
123+
console.log(error);
124+
throw error;
125+
}
116126
}
117127

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

0 commit comments

Comments
 (0)