Skip to content

Commit

Permalink
handled case when organization_uid is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
harshithad0703 committed Sep 17, 2024
1 parent 0e77ffd commit a48ff02
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/commands/app/install.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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"]) {
Expand Down

0 comments on commit a48ff02

Please sign in to comment.