@@ -319,15 +319,26 @@ export class BundlePusher {
319
319
try {
320
320
this . sshOutputText = "" ;
321
321
const shell = await Shell . executeSshCwd ( sshSession , sshCommand , directory , this . sshOutput . bind ( this ) ) ;
322
+ const upperCaseOutputText = this . sshOutputText . toUpperCase ( ) ;
322
323
323
324
// Did the SSH command work? It's unclear how to tell, but for starters let's look for common
324
- // signifiers in the output text. Note that FSUM9195 implies that we've tried to delete the
325
+ // signifiers in the output text. Note that FSUM9195 can imply that we've tried to delete the
325
326
// contents of an empty directory - that's not a problem.
326
- const upperCaseOutputText = this . sshOutputText . toUpperCase ( ) ;
327
- if ( upperCaseOutputText . indexOf ( "ERROR " ) > - 1 ||
328
- ( upperCaseOutputText . indexOf ( "FSUM" ) > - 1 &&
329
- upperCaseOutputText . indexOf ( "FSUM9195" ) === - 1 ) ||
327
+
328
+ // If there any FSUM messages other than FSUM9195 then that's a problem
329
+ let otherFSUMMessages = false ;
330
+ const countFSUM = ( upperCaseOutputText . match ( / F S U M / g) || [ ] ) . length ;
331
+ const countFSUM9195 = ( upperCaseOutputText . match ( / F S U M 9 1 9 5 / g) || [ ] ) . length ;
332
+ if ( countFSUM > countFSUM9195 ) {
333
+ otherFSUMMessages = true ;
334
+ }
335
+
336
+ // Now check for other common error signifiers
337
+ if ( otherFSUMMessages ||
338
+ upperCaseOutputText . indexOf ( "ERROR " ) > - 1 ||
339
+ upperCaseOutputText . indexOf ( "EDC" ) > - 1 ||
330
340
upperCaseOutputText . indexOf ( "ERR!" ) > - 1 ) {
341
+
331
342
// if we've not already logged the output, log it now
332
343
if ( this . params . arguments . verbose !== true )
333
344
{
0 commit comments