Skip to content

fix: correct non-interactive error message mentioning --confirm/--no-confirm - #1358

Open
kuntal1461 wants to merge 1 commit into
apify:masterfrom
kuntal1461:fix/1354-non-interactive-confirm-error-message
Open

fix: correct non-interactive error message mentioning --confirm/--no-confirm#1358
kuntal1461 wants to merge 1 commit into
apify:masterfrom
kuntal1461:fix/1354-non-interactive-confirm-error-message

Conversation

@kuntal1461

Copy link
Copy Markdown
Contributor

Fixes #1354.

What changed and why

  • _stdinCheckWrapper.ts: Removed the dead ConfirmFlag/NoConfirmFlag constants and replaced the default errorMessageForStdin with a message that points to --yes — the flag that actually exists and bypasses confirmation prompts on all rm commands.
  • useActorConfig.ts: Added a per-call errorMessageForStdin to both config-migration prompts. Those prompts cannot be bypassed via --yes (the flag is never propagated into the hook), so the message correctly tells users to run in an interactive terminal instead.
  • test/local/lib/stdinCheckWrapper.test.ts: New regression tests (7) that assert --confirm/--no-confirm never appear in the default error, --yes is mentioned, and all override-priority rules hold.

Before / After

Before (any rm command in CI without --yes):

Error: Please use the --confirm/--no-confirm flags to confirm the action.

(those flags do not exist)

After:

Error: This command requires interactive confirmation. Pass --yes to confirm non-interactively.

Notes

  • No flags, args, or command descriptions were added or changed — pnpm run update-docs not required.
  • The two pre-existing Python pip failures in test:local are unrelated to this change (environment issue with Python 3.14 on the dev machine).

…confirm

Closes apify#1354.

- stdinCheckWrapper default error referenced --confirm/--no-confirm flags
  that do not exist; replaced with a message pointing to --yes (the actual
  bypass flag used by all rm commands)
- Added per-call errorMessageForStdin to the two migration prompts in
  useActorConfig where --yes is not applicable, giving an accurate
  "run in an interactive terminal" message instead
- Added regression tests in test/local/lib/stdinCheckWrapper.test.ts
  that assert the old flag names no longer appear and --yes is mentioned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Non-interactive error tells users to pass --confirm/--no-confirm, which do not exist

2 participants