Skip to content

Commit 321cfb6

Browse files
fix: update command error message print fixes
1 parent 7a6c139 commit 321cfb6

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/commands/app/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import {
1616
} from "fs";
1717
import { ux, cliux, flags, HttpClient } from "@contentstack/cli-utilities";
1818

19-
import { appCreate, commonMsg } from "../../messages";
2019
import { BaseCommand } from "./base-command";
2120
import { AppManifest, AppType } from "../../types";
21+
import { appCreate, commonMsg } from "../../messages";
2222
import {
2323
getOrg,
2424
getAppName,

src/commands/app/update.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import pick from "lodash/pick";
22
import merge from "lodash/merge";
3+
import isEmpty from "lodash/isEmpty";
34
import { flags } from "@contentstack/cli-utilities";
45
import { App } from "@contentstack/management/types/app";
56
import { existsSync, readFileSync, writeFileSync } from "fs";
@@ -43,7 +44,7 @@ export default class Update extends BaseCommand<typeof Update> {
4344
await this.validateAppUidAndVersion();
4445
await this.updateAppOnDeveloperHub();
4546
} catch (error: Error | any) {
46-
if (error?.errorMessage || error?.message) {
47+
if (error?.errorMessage || error?.message || !isEmpty(error)) {
4748
this.log(error?.errorMessage || error?.message || error, "error");
4849
}
4950

0 commit comments

Comments
 (0)