1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

config command

This commit is contained in:
Kyle Spearrin
2018-05-17 00:07:44 -04:00
parent 7eb0c00a87
commit 02886b266c
2 changed files with 52 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import * as program from 'commander';
import { Main } from './bw';
import { ConfigCommand } from './commands/config.command';
import { CreateCommand } from './commands/create.command';
import { DeleteCommand } from './commands/delete.command';
import { EditCommand } from './commands/edit.command';
@@ -386,6 +387,26 @@ export class Program {
this.processResponse(response);
});
program
.command('config <setting> <value>')
.description('Configure settings.')
.on('--help', () => {
writeLn('\n Settings:');
writeLn('');
writeLn(' server - On-premise hosted installation URL.');
writeLn('');
writeLn(' Examples:');
writeLn('');
writeLn(' bw config server https://bw.company.com');
writeLn(' bw config server bitwarden.com');
writeLn('');
})
.action(async (setting, value, cmd) => {
const command = new ConfigCommand(this.main.environmentService);
const response = await command.run(setting, value, cmd);
this.processResponse(response);
});
program
.command('update')
.description('Check for updates.')