From a48ff02b111af812e9e20fc66541b0c06cda2157 Mon Sep 17 00:00:00 2001 From: "harshitha.d" Date: Tue, 17 Sep 2024 15:35:36 +0530 Subject: [PATCH] handled case when organization_uid is empty --- src/commands/app/install.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/commands/app/install.ts b/src/commands/app/install.ts index c1bf83f..89b055d 100644 --- a/src/commands/app/install.ts +++ b/src/commands/app/install.ts @@ -1,6 +1,6 @@ import { cliux, flags, FlagInput } from "@contentstack/cli-utilities"; -import {AppCLIBaseCommand} from "../../app-cli-base-command"; +import { AppCLIBaseCommand } from "../../app-cli-base-command"; import { $t, commonMsg, installAppMsg } from "../../messages"; import { getOrg, @@ -47,11 +47,12 @@ export default class Install extends AppCLIBaseCommand { // get organization to be used this.sharedConfig.org = - this.manifestData?.organization_uid ?? - (await getOrg(this.flags, { - managementSdk: this.managementSdk, - log: this.log, - })); + this.manifestData?.organization_uid !== "" + ? this.manifestData.organization_uid + : await getOrg(this.flags, { + managementSdk: this.managementSdk, + log: this.log, + }); // fetch app details if (!this.flags["app-uid"]) {