Skip to content

Commit c7caa36

Browse files
authored
Merge pull request #183 from contentstack/fix/DX-8609
fix: path handling of spaces while import
2 parents 92ccf3f + daf7c49 commit c7caa36

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/contentstack-import/src/utils/import-config-handler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ const setupConfig = async (importCmdFlags: any): Promise<ImportConfig> => {
138138

139139
if (existsSync(spacesDir) && existsSync(stackSettingsPath)) {
140140
try {
141-
const stackSettings = JSON.parse(readFileSync(stackSettingsPath));
141+
const stackSettings = readFileSync(stackSettingsPath);
142142
if (stackSettings?.am_v2) {
143143
config.csAssetsEnabled = true;
144144
config.csAssetsUrl = configHandler.get('region')?.csAssetsUrl;
145145

146146
if (existsSync(stackJsonPath)) {
147147
try {
148-
const stackData = JSON.parse(readFileSync(stackJsonPath));
148+
const stackData = readFileSync(stackJsonPath);
149149
const apiKey = stackData?.api_key || stackData?.stackHeaders?.api_key;
150150
if (apiKey) {
151151
config.source_stack = apiKey;

0 commit comments

Comments
 (0)