@@ -10,7 +10,7 @@ import {
1010} from '@contentstack/cli-utilities' ;
1111import { PATH_CONSTANTS } from '../../constants' ;
1212import { Export , ExportProjects } from '@contentstack/cli-variants' ;
13- import { fsUtil , PROCESS_NAMES , MODULE_CONTEXTS , PROCESS_STATUS , MODULE_NAMES } from '../../utils' ;
13+ import { fsUtil , getExportBasePath , PROCESS_NAMES , MODULE_CONTEXTS , PROCESS_STATUS , MODULE_NAMES } from '../../utils' ;
1414import BaseClass , { ApiOptions } from './base-class' ;
1515import { ExportConfig , ModuleClassParams } from '../../types' ;
1616
@@ -41,20 +41,18 @@ export default class EntriesExport extends BaseClass {
4141 this . stackAPIClient = stackAPIClient ;
4242 this . exportConfig = exportConfig ;
4343 this . entriesConfig = exportConfig . modules . entries ;
44+ const basePath = getExportBasePath ( exportConfig ) ;
4445 this . entriesDirPath = path . resolve (
45- sanitizePath ( exportConfig . exportDir ) ,
46- sanitizePath ( exportConfig . branchName || '' ) ,
46+ sanitizePath ( basePath ) ,
4747 sanitizePath ( this . entriesConfig . dirName ) ,
4848 ) ;
4949 this . localesFilePath = path . resolve (
50- sanitizePath ( exportConfig . exportDir ) ,
51- sanitizePath ( exportConfig . branchName || '' ) ,
50+ sanitizePath ( basePath ) ,
5251 sanitizePath ( exportConfig . modules . locales . dirName ) ,
5352 sanitizePath ( exportConfig . modules . locales . fileName ) ,
5453 ) ;
5554 this . contentTypesDirPath = path . resolve (
56- sanitizePath ( exportConfig . exportDir ) ,
57- sanitizePath ( exportConfig . branchName || '' ) ,
55+ sanitizePath ( basePath ) ,
5856 sanitizePath ( exportConfig . modules . content_types . dirName ) ,
5957 ) ;
6058 this . projectInstance = new ExportProjects ( this . exportConfig ) ;
0 commit comments