Skip to content

Commit

Permalink
Merge pull request #1200 from contentstack/fix/CS-42853
Browse files Browse the repository at this point in the history
fix: window os absolute path issue in migration command
  • Loading branch information
aman19K authored Dec 12, 2023
2 parents 01f26f5 + 951a8fc commit 4b68700
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 9 deletions.
6 changes: 3 additions & 3 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-migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ $ npm install -g @contentstack/cli-migration
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-migration/1.4.1 darwin-arm64 node-v20.8.0
@contentstack/cli-migration/1.4.2 darwin-arm64 node-v20.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-migration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-migration",
"version": "1.4.1",
"version": "1.4.2",
"author": "@contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,10 @@ class MigrationCommand extends Command {

if (Array.isArray(config) && config.length > 0) {
let configObj = config.reduce((a, v) => {
let objArr = v.split(':');
return { ...a, [objArr[0]]: objArr[1] };
//NOTE: Temp code to handle only one spilt(Window absolute path issue).Need to replace with hardcoded config key
let [key, ...value] = v.split(':');
value = value?.length > 1 ? value?.join(':') : value?.join( );
return { ...a, [key]: value };
}, {});
set('config', mapInstance, configObj);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-config": "~1.5.0",
"@contentstack/cli-launch": "~1.0.15",
"@contentstack/cli-migration": "~1.4.1",
"@contentstack/cli-migration": "~1.4.2",
"@contentstack/cli-utilities": "~1.5.9",
"@contentstack/management": "~1.13.0",
"@oclif/core": "^2.9.3",
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 4b68700

Please sign in to comment.