1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

auto-accept edits when commands are piped together - the user does not have the ability to accept a prompt (#16889)

This commit is contained in:
Nick Krantz
2025-10-15 13:46:41 -05:00
committed by GitHub
parent 75182926d4
commit eee2aca111

View File

@@ -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<boolean> {
// 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.",
);