@@ -3,7 +3,6 @@ import { join, resolve } from 'node:path';
33import process from 'node:process' ;
44
55import type { Actor , ActorCollectionCreateOptions , ActorDefaultRunOptions } from 'apify-client' ;
6- import isCI from 'is-ci' ;
76import open from 'open' ;
87
98import { fetchManifest } from '@apify/actor-templates' ;
@@ -15,7 +14,6 @@ import { Flags } from '../../lib/command-framework/flags.js';
1514import { CommandExitCodes , DEPRECATED_LOCAL_CONFIG_NAME , LOCAL_CONFIG_PATH } from '../../lib/consts.js' ;
1615import { sumFilesSizeInBytes } from '../../lib/files.js' ;
1716import { useActorConfig } from '../../lib/hooks/useActorConfig.js' ;
18- import { useYesNoConfirm } from '../../lib/hooks/user-confirmations/useYesNoConfirm.js' ;
1917import { error , info , link , run , success , warning } from '../../lib/outputs.js' ;
2018import { transformEnvToEnvVars } from '../../lib/secrets.js' ;
2119import {
@@ -66,9 +64,8 @@ export class ActorsPushCommand extends ApifyCommand<typeof ActorsPushCommand> {
6664 description : 'Seconds for waiting to build to finish, if no value passed, it waits forever.' ,
6765 required : false ,
6866 } ) ,
69- 'no-prompt' : Flags . boolean ( {
70- description :
71- 'Do not prompt for opening the Actor details in a browser. This will also not open the browser automatically.' ,
67+ 'open' : Flags . boolean ( {
68+ description : 'Whether to open the browser automatically to the Actor details page.' ,
7269 default : false ,
7370 required : false ,
7471 } ) ,
@@ -311,15 +308,13 @@ Skipping push. Use --force to override.`,
311308 url : `https://console.apify.com${ redirectUrlPart } /actors/${ build . actId } #/builds/${ build . buildNumber } ` ,
312309 } ) ;
313310
314- // Disable open browser on CI, or if user passed --no-prompt flag
315- if ( ! isCI && ! this . flags . noPrompt ) {
316- const shouldOpenBrowser = await useYesNoConfirm ( {
317- message : 'Do you want to open the Actor detail in your browser?' ,
318- } ) ;
311+ link ( {
312+ message : 'Actor detail' ,
313+ url : `https://console.apify.com${ redirectUrlPart } /actors/${ build . actId } ` ,
314+ } ) ;
319315
320- if ( shouldOpenBrowser ) {
321- await open ( `https://console.apify.com${ redirectUrlPart } /actors/${ build . actId } ` ) ;
322- }
316+ if ( this . flags . open ) {
317+ await open ( `https://console.apify.com${ redirectUrlPart } /actors/${ build . actId } ` ) ;
323318 }
324319
325320 if ( build . status === ACTOR_JOB_STATUSES . SUCCEEDED ) {
0 commit comments