@@ -18,7 +18,6 @@ const archiver = require("../helpers/archiver"),
18
18
{ initTimeComponents, instrumentEventTime, markBlockStart, markBlockEnd, getTimeComponents} = require ( '../helpers/timeComponents' ) ,
19
19
downloadBuildArtifacts = require ( '../helpers/buildArtifacts' ) . downloadBuildArtifacts ,
20
20
downloadBuildStacktrace = require ( '../helpers/downloadBuildStacktrace' ) . downloadBuildStacktrace ,
21
- updateNotifier = require ( 'update-notifier' ) ,
22
21
pkg = require ( '../../package.json' ) ,
23
22
packageDiff = require ( '../helpers/package-diff' ) ;
24
23
const { getStackTraceUrl } = require ( '../helpers/sync/syncSpecsLogs' ) ;
@@ -249,6 +248,9 @@ module.exports = function run(args, rawArgs) {
249
248
utils . setProcessHooks ( data . build_id , bsConfig , bs_local , args , buildReportData ) ;
250
249
let message = `${ data . message } ! ${ Constants . userMessages . BUILD_CREATED } with build id: ${ data . build_id } ` ;
251
250
let dashboardLink = `${ Constants . userMessages . VISIT_DASHBOARD } ${ data . dashboard_url } ` ;
251
+ if ( turboScaleSession ) {
252
+ dashboardLink = `${ Constants . userMessages . VISIT_ATS_DASHBOARD } ${ data . dashboard_url } ` ;
253
+ }
252
254
buildReportData = { 'build_id' : data . build_id , 'parallels' : userSpecifiedParallels , ...buildReportData }
253
255
utils . exportResults ( data . build_id , `${ config . dashboardUrl } ${ data . build_id } ` ) ;
254
256
if ( ( utils . isUndefined ( bsConfig . run_settings . parallels ) && utils . isUndefined ( args . parallels ) ) || ( ! utils . isUndefined ( bsConfig . run_settings . parallels ) && bsConfig . run_settings . parallels == Constants . cliMessages . RUN . DEFAULT_PARALLEL_MESSAGE ) ) {
@@ -311,6 +313,8 @@ module.exports = function run(args, rawArgs) {
311
313
logger . info ( Constants . userMessages . BUILD_FAILED_ERROR )
312
314
process . exitCode = Constants . BUILD_FAILED_EXIT_CODE ;
313
315
} ) ;
316
+ } else {
317
+ utils . handleSyncExit ( exitCode , data . dashboard_url ) ;
314
318
}
315
319
} ) ;
316
320
} else if ( utils . nonEmptyArray ( bsConfig . run_settings . downloads && ! turboScaleSession ) ) {
@@ -452,23 +456,27 @@ module.exports = function run(args, rawArgs) {
452
456
utils . sendUsageReport ( bsJsonData , args , err . message , Constants . messageTypes . ERROR , utils . getErrorCodeFromErr ( err ) , null , rawArgs ) ;
453
457
process . exitCode = Constants . ERROR_EXIT_CODE ;
454
458
} ) . finally ( function ( ) {
455
- const notifier = updateNotifier ( {
456
- pkg,
457
- updateCheckInterval : 1000 * 60 * 60 * 24 * 7 ,
458
- } ) ;
459
+ import ( 'update-notifier' ) . then ( ( { default : updateNotifier } ) => {
460
+ const notifier = updateNotifier ( {
461
+ pkg,
462
+ updateCheckInterval : 1000 * 60 * 60 * 24 * 7 ,
463
+ } ) ;
459
464
460
- // Checks for update on first run.
461
- // Set lastUpdateCheck to 0 to spawn the check update process as notifier sets this to Date.now() for preventing
462
- // the check untill one interval period. It runs once.
463
- if ( ! notifier . disabled && Date . now ( ) - notifier . config . get ( 'lastUpdateCheck' ) < 50 ) {
464
- notifier . config . set ( 'lastUpdateCheck' , 0 ) ;
465
- notifier . check ( ) ;
466
- }
465
+ // Checks for update on first run.
466
+ // Set lastUpdateCheck to 0 to spawn the check update process as notifier sets this to Date.now() for preventing
467
+ // the check untill one interval period. It runs once.
468
+ if ( ! notifier . disabled && Date . now ( ) - notifier . config . get ( 'lastUpdateCheck' ) < 50 ) {
469
+ notifier . config . set ( 'lastUpdateCheck' , 0 ) ;
470
+ notifier . check ( ) ;
471
+ }
467
472
468
- // Set the config update as notifier clears this after reading.
469
- if ( notifier . update && notifier . update . current !== notifier . update . latest ) {
470
- notifier . config . set ( 'update' , notifier . update ) ;
471
- notifier . notify ( { isGlobal : true } ) ;
472
- }
473
+ // Set the config update as notifier clears this after reading.
474
+ if ( notifier . update && notifier . update . current !== notifier . update . latest ) {
475
+ notifier . config . set ( 'update' , notifier . update ) ;
476
+ notifier . notify ( { isGlobal : true } ) ;
477
+ }
478
+ } ) . catch ( ( error ) => {
479
+ logger . debug ( 'Got error loading update-notifier: ' , error ) ;
480
+ } ) ;
473
481
} ) ;
474
482
}
0 commit comments