From 7c8f43c4b630ebc6c5c910759d6f7e17d23f9183 Mon Sep 17 00:00:00 2001 From: Elliot Campbell Date: Wed, 2 Aug 2023 17:11:11 -0400 Subject: [PATCH] fix features get returning empty array when no keys --- README.md | 2 +- oclif.manifest.json | 2 +- src/commands/features/get.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 401809e7b..c71d661fd 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ $ npm install -g @devcycle/cli $ dvc COMMAND running command... $ dvc (--version) -@devcycle/cli/5.2.0 linux-x64 node-v18.16.0 +@devcycle/cli/5.2.0 darwin-arm64 node-v18.16.0 $ dvc --help [COMMAND] USAGE $ dvc COMMAND diff --git a/oclif.manifest.json b/oclif.manifest.json index 0def9af96..5513067c7 100644 --- a/oclif.manifest.json +++ b/oclif.manifest.json @@ -1,5 +1,5 @@ { - "version": "5.1.0", + "version": "5.2.0", "commands": { "authCommand": { "id": "authCommand", diff --git a/src/commands/features/get.ts b/src/commands/features/get.ts index 75d0aa8e7..63dac111d 100644 --- a/src/commands/features/get.ts +++ b/src/commands/features/get.ts @@ -20,13 +20,13 @@ export default class DetailedFeatures extends Base { public async run(): Promise { const { flags } = await this.parse(DetailedFeatures) - const keys = flags['keys']?.split(',') || [] + const keys = flags['keys']?.split(',') const { project, headless } = flags await this.requireProject(project, headless) let features if (keys) { features = await batchRequests( - keys, + keys, (key) => fetchFeatureByKey(this.authToken, this.projectKey, key) ) } else {