1
0
mirror of https://github.com/bitwarden/cli synced 2025-12-17 16:53:13 +00:00

prompt for unlock if can interact

This commit is contained in:
Kyle Spearrin
2019-10-21 16:04:51 -04:00
parent 268852035a
commit e7450d27e4
4 changed files with 21 additions and 4 deletions

View File

@@ -15,7 +15,8 @@ export class ExportCommand {
constructor(private cryptoService: CryptoService, private exportService: ExportService) { }
async run(password: string, cmd: program.Command): Promise<Response> {
if (password == null || password === '') {
const canInteract = process.stdout.isTTY && process.env.BW_NOINTERACTION !== 'true';
if ((password == null || password === '') && canInteract) {
const answer: inquirer.Answers = await inquirer.createPromptModule({ output: process.stderr })({
type: 'password',
name: 'password',