diff --git a/packages/contentstack-command/package.json b/packages/contentstack-command/package.json index 871acd454b..c6a553a4ff 100644 --- a/packages/contentstack-command/package.json +++ b/packages/contentstack-command/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-command", "description": "Contentstack CLI plugin for configuration", - "version": "1.2.4", + "version": "1.2.5", "author": "Contentstack", "main": "lib/index.js", "types": "./types/index.d.ts", diff --git a/packages/contentstack-command/src/index.ts b/packages/contentstack-command/src/index.ts index 39cccefa87..3adf2b44f3 100644 --- a/packages/contentstack-command/src/index.ts +++ b/packages/contentstack-command/src/index.ts @@ -1,6 +1,6 @@ import * as ContentstackDeliverySDK from 'contentstack'; import { URL } from 'url'; -import { configHandler, CLIError, Command } from '@contentstack/cli-utilities'; +import { configHandler, CLIError, Command, cliux } from '@contentstack/cli-utilities'; import { Region } from './interfaces'; const defaultRateLimit = 5; @@ -33,7 +33,11 @@ abstract class ContentstackCommand extends Command { get region() { if (this._region) return this._region; this._region = configHandler.get('region'); - if (this._region) return this._region; + if(!this._region) { + cliux.print("Error: Region not configured. Please set the region.",{color:"red"}) + process.exit(1) + } + else return this._region; } get rateLimit() {