From eee2aca1117d3d61cde4e8d10ccce0bb4d81e397 Mon Sep 17 00:00:00 2001 From: Nick Krantz <125900171+nick-livefront@users.noreply.github.com> Date: Wed, 15 Oct 2025 13:46:41 -0500 Subject: [PATCH] auto-accept edits when commands are piped together - the user does not have the ability to accept a prompt (#16889) --- apps/cli/src/commands/edit.command.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/apps/cli/src/commands/edit.command.ts b/apps/cli/src/commands/edit.command.ts index f4216196ea..14a218c714 100644 --- a/apps/cli/src/commands/edit.command.ts +++ b/apps/cli/src/commands/edit.command.ts @@ -261,8 +261,13 @@ export class EditCommand { /** Prompt the user to accept movement of their cipher back to the their vault. */ private async promptForArchiveEdit(): Promise { - // When running in serve or no interaction mode, automatically accept the prompt - if (process.env.BW_SERVE === "true" || process.env.BW_NOINTERACTION === "true") { + // When user has disabled interactivity or does not have the ability to prompt, + // automatically move the item back to the vault and inform them. + if ( + process.env.BW_SERVE === "true" || + process.env.BW_NOINTERACTION === "true" || + !process.stdin.isTTY + ) { CliUtils.writeLn( "Archive is only available with a Premium subscription, which has ended. Your edit was saved and the item was moved back to your vault.", );