We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c44913 commit c7cdeaaCopy full SHA for c7cdeaa
ingestion/src/process/prepare/codebase.ts
@@ -44,8 +44,9 @@ export class Codebase {
44
this._dataDirPath = path.resolve(this._path, this._dataDirName)
45
46
/* Handle data directory */
47
- if (removeExisting && existsSync(this._dataDirPath)) rmSync(this._dataDirPath, { recursive: true })
48
- mkdirSync(this._dataDirPath)
+ const exists = existsSync(this._dataDirPath)
+ if (removeExisting && exists) rmSync(this._dataDirPath, { recursive: true })
49
+ if (!exists) mkdirSync(this._dataDirPath)
50
}
51
52
private prepareFilesMetadata() {
0 commit comments