1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-11 22:03:33 +00:00

Update to commander 7 (#94)

* Upgrade to commander 7.0.0

* Match lint rules for typescript

* update jslib
This commit is contained in:
Matt Gibson
2021-02-08 13:32:02 -06:00
committed by GitHub
parent 9a1caf1e7e
commit e5d0b3a372
17 changed files with 397 additions and 92 deletions

View File

@@ -33,13 +33,13 @@ export class ConfigCommand {
constructor(private environmentService: EnvironmentService, private i18nService: I18nService,
private configurationService: ConfigurationService) { }
async run(setting: string, value: string, cmd: program.Command): Promise<Response> {
async run(setting: string, value: string, options: program.OptionValues): Promise<Response> {
setting = setting.toLowerCase();
if (value == null || value === '') {
if (cmd.secretfile) {
value = await NodeUtils.readFirstLine(cmd.secretfile);
} else if (cmd.secretenv && process.env[cmd.secretenv]) {
value = process.env[cmd.secretenv];
if (options.secretfile) {
value = await NodeUtils.readFirstLine(options.secretfile);
} else if (options.secretenv && process.env[options.secretenv]) {
value = process.env[options.secretenv];
}
}
try {