Closed Alexander-Shukaev closed 2 years ago
This is intentional. Currently, the export command always prompts for your master password, even if you supply the session key, so you must run it in interactive mode. See bitwarden/clients#2739 for discussion around allowing non-interactive export. I'll close this as a duplicate.
This is intentional. Currently, the export command always prompts for your master password, even if you supply the session key, so you must run it in interactive mode. See bitwarden/clients#2739 for discussion around allowing non-interactive export. I'll close this as a duplicate.
@eliykat, not sure what you mean by prompt, but export
does not prompt me anything if I supply password as positional argument, so it can already run as part of some automated script. As a result, I don't really understand the point behind the snippet in subject.
You're right, my mistake. I confused authing with the apikey vs. unlocking with the master password. I agree we should modify this if
statement to allow it to run in non-interactive mode if the master password has been passed in (and the user is not using Key Connector, which would require a TOTP code).
export
command can be verified with positional argument non-interactively, meaning the followingBW_NOINTERACTION
check is invalid:https://github.com/bitwarden/cli/blob/f26bfb5859c7a4e2b5ccd21c6811f3b7401180c0/src/commands/export.command.ts#L36-L41