Skip to content

Commit 06a7d83

Browse files
committed
chore: make opening the actor build results in push opt-in
1 parent 7f391f8 commit 06a7d83

File tree

2 files changed

+5
-15
lines changed

2 files changed

+5
-15
lines changed

src/commands/actors/push.ts

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { join, resolve } from 'node:path';
33
import process from 'node:process';
44

55
import type { Actor, ActorCollectionCreateOptions, ActorDefaultRunOptions } from 'apify-client';
6-
import isCI from 'is-ci';
76
import open from 'open';
87

98
import { fetchManifest } from '@apify/actor-templates';
@@ -15,7 +14,6 @@ import { Flags } from '../../lib/command-framework/flags.js';
1514
import { CommandExitCodes, DEPRECATED_LOCAL_CONFIG_NAME, LOCAL_CONFIG_PATH } from '../../lib/consts.js';
1615
import { sumFilesSizeInBytes } from '../../lib/files.js';
1716
import { useActorConfig } from '../../lib/hooks/useActorConfig.js';
18-
import { useYesNoConfirm } from '../../lib/hooks/user-confirmations/useYesNoConfirm.js';
1917
import { error, info, link, run, success, warning } from '../../lib/outputs.js';
2018
import { transformEnvToEnvVars } from '../../lib/secrets.js';
2119
import {
@@ -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 build details.',
7269
default: false,
7370
required: false,
7471
}),
@@ -311,15 +308,8 @@ 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-
});
319-
320-
if (shouldOpenBrowser) {
321-
await open(`https://console.apify.com${redirectUrlPart}/actors/${build.actId}`);
322-
}
311+
if (this.flags.open) {
312+
await open(`https://console.apify.com${redirectUrlPart}/actors/${build.actId}`);
323313
}
324314

325315
if (build.status === ACTOR_JOB_STATUSES.SUCCEEDED) {

src/lib/hooks/user-confirmations/useMaskedInput.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ interface UseMaskedInputInput {
88
}
99

1010
export const useMaskedInput = stdinCheckWrapper(async ({ message, mask }: UseMaskedInputInput) => {
11-
const result = await password({ message, mask });
11+
const result = await password({ message, mask: mask ?? '*' });
1212

1313
return result;
1414
});

0 commit comments

Comments
 (0)