File tree 1 file changed +13
-3
lines changed
src/commands/cli/tarballs
1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,18 @@ export default class SmokeTest extends SfCommand<void> {
111
111
}
112
112
113
113
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
+ }
116
126
}
117
127
118
128
private async nonVerboseCommandExecution ( executable : string , command : string ) : Promise < void > {
@@ -131,7 +141,7 @@ export default class SmokeTest extends SfCommand<void> {
131
141
const { stdout } = await exec ( command , { maxBuffer : 1024 * 1024 * 100 } ) ;
132
142
if ( ! silent ) {
133
143
this . styledHeader ( command ) ;
134
- this . log ( stdout ) ;
144
+ this . log ( stripAnsi ( stdout ) ) ;
135
145
}
136
146
return stripAnsi ( stdout ) ;
137
147
} catch ( e ) {
You can’t perform that action at this time.
0 commit comments