We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 80e2be8 + bd35aa8 commit df87b93Copy full SHA for df87b93
1 file changed
packages/contentstack-import/src/utils/backup-handler.ts
@@ -4,8 +4,10 @@ import { ImportConfig } from '../types';
4
5
export default function setupBackupDir(importConfig: ImportConfig): Promise<string> {
6
return new Promise(async (resolve, reject) => {
7
- const backupDirPath =
8
- importConfig?.useBackedupDir || path.join(process.cwd(), '_backup_' + Math.floor(Math.random() * 1000));
+ if (importConfig.hasOwnProperty('useBackedupDir')) {
+ return resolve(importConfig.useBackedupDir);
9
+ }
10
+ const backupDirPath = path.join(process.cwd(), '_backup_' + Math.floor(Math.random() * 1000));
11
const limit = importConfig.backupConcurrency || 16;
12
if (path.isAbsolute(importConfig.contentDir)) {
13
return ncp(importConfig.contentDir, backupDirPath, { limit }, (error) => {
0 commit comments