From 7b68216fd4da838b561d102685733208ffd8e47a Mon Sep 17 00:00:00 2001 From: Aman Kumar Date: Mon, 4 Dec 2023 19:48:21 +0530 Subject: [PATCH] fix: window os absolute path issue in migration command --- .../src/commands/cm/stacks/migration.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/contentstack-migration/src/commands/cm/stacks/migration.js b/packages/contentstack-migration/src/commands/cm/stacks/migration.js index 631245743c..fe6daf480c 100644 --- a/packages/contentstack-migration/src/commands/cm/stacks/migration.js +++ b/packages/contentstack-migration/src/commands/cm/stacks/migration.js @@ -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); }