Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion features/test-implementations/1.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ Given<TestWorld>(/the local actor is pushed to the Apify platform/i, { timeout:
}

const result = await executeCommand({
rawCommand: 'apify push --no-prompt',
rawCommand: 'apify push',
cwd: this.testActor.pwd,
env: extraEnv,
});
Expand Down
21 changes: 8 additions & 13 deletions src/commands/actors/push.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { join, resolve } from 'node:path';
import process from 'node:process';

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

import { fetchManifest } from '@apify/actor-templates';
Expand All @@ -15,7 +14,6 @@ import { Flags } from '../../lib/command-framework/flags.js';
import { CommandExitCodes, DEPRECATED_LOCAL_CONFIG_NAME, LOCAL_CONFIG_PATH } from '../../lib/consts.js';
import { sumFilesSizeInBytes } from '../../lib/files.js';
import { useActorConfig } from '../../lib/hooks/useActorConfig.js';
import { useYesNoConfirm } from '../../lib/hooks/user-confirmations/useYesNoConfirm.js';
import { error, info, link, run, success, warning } from '../../lib/outputs.js';
import { transformEnvToEnvVars } from '../../lib/secrets.js';
import {
Expand Down Expand Up @@ -66,9 +64,8 @@ export class ActorsPushCommand extends ApifyCommand<typeof ActorsPushCommand> {
description: 'Seconds for waiting to build to finish, if no value passed, it waits forever.',
required: false,
}),
'no-prompt': Flags.boolean({
description:
'Do not prompt for opening the Actor details in a browser. This will also not open the browser automatically.',
'open': Flags.boolean({
description: 'Whether to open the browser automatically to the Actor details page.',
default: false,
required: false,
}),
Expand Down Expand Up @@ -311,15 +308,13 @@ Skipping push. Use --force to override.`,
url: `https://console.apify.com${redirectUrlPart}/actors/${build.actId}#/builds/${build.buildNumber}`,
});

// Disable open browser on CI, or if user passed --no-prompt flag
if (!isCI && !this.flags.noPrompt) {
const shouldOpenBrowser = await useYesNoConfirm({
message: 'Do you want to open the Actor detail in your browser?',
});
link({
message: 'Actor detail',
url: `https://console.apify.com${redirectUrlPart}/actors/${build.actId}`,
});

if (shouldOpenBrowser) {
await open(`https://console.apify.com${redirectUrlPart}/actors/${build.actId}`);
}
if (this.flags.open) {
await open(`https://console.apify.com${redirectUrlPart}/actors/${build.actId}`);
}

if (build.status === ACTOR_JOB_STATUSES.SUCCEEDED) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/hooks/user-confirmations/useMaskedInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface UseMaskedInputInput {
}

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

return result;
});
Loading