diff --git a/packages/contentstack-export/src/commands/cm/stacks/export.ts b/packages/contentstack-export/src/commands/cm/stacks/export.ts index 86b0f0ebf3..eee96bb61d 100644 --- a/packages/contentstack-export/src/commands/cm/stacks/export.ts +++ b/packages/contentstack-export/src/commands/cm/stacks/export.ts @@ -98,7 +98,7 @@ export default class ExportCommand extends Command { static aliases: string[] = ['cm:export']; async run(): Promise { - let exportDir: string = path.join(__dirname, 'logs'); + let exportDir: string = path.join(process.cwd(), 'logs'); try { const { flags } = await this.parse(ExportCommand); let exportConfig = await setupExportConfig(flags);