Skip to content

Commit

Permalink
Merge pull request #1226 from contentstack/fix/region-error-msg
Browse files Browse the repository at this point in the history
fix: set region command error with doc link
  • Loading branch information
aman19K authored Jan 2, 2024
2 parents 2ec21db + b07afbd commit c5006a2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-command",
"description": "Contentstack CLI plugin for configuration",
"version": "1.2.16",
"version": "1.2.17",
"author": "Contentstack",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
9 changes: 8 additions & 1 deletion packages/contentstack-command/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ abstract class ContentstackCommand extends Command {
if (!this._region) this._region = configHandler.get('region');

if (!this._region) {
cliux.print('Error: Region not configured. Please set the region.', { color: 'red' });
//NOTE: this.log suggestion not working
cliux.print('Error: Region not configured. Please set the region with command $ csdx config:set:region', {
color: 'red',
});
cliux.print(
`Suggestions: To set the region https://www.contentstack.com/docs/developers/cli/configure-regions-in-the-cli`,
{ color: 'yellow' },
);
process.exit(1);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"@contentstack/cli-cm-import": "~1.12.2",
"@contentstack/cli-cm-migrate-rte": "~1.4.15",
"@contentstack/cli-cm-seed": "~1.7.0",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-command": "~1.2.17",
"@contentstack/cli-config": "~1.5.1",
"@contentstack/cli-launch": "~1.0.15",
"@contentstack/cli-migration": "~1.4.2",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c5006a2

Please sign in to comment.