()
| 420 | } |
| 421 | |
| 422 | protected async initPaths(): Promise<void> { |
| 423 | if (this.absolutePath || this.options.migrationsList) { |
| 424 | return; |
| 425 | } |
| 426 | |
| 427 | const { fs } = await import('@mikro-orm/core/fs-utils'); |
| 428 | this.detectSourceFolder(fs); |
| 429 | |
| 430 | /* v8 ignore next */ |
| 431 | const key = this.config.get('preferTs', Utils.detectTypeScriptSupport()) && this.options.pathTs ? 'pathTs' : 'path'; |
| 432 | this.absolutePath = fs.absolutePath(this.options[key]!, this.config.get('baseDir')); |
| 433 | |
| 434 | try { |
| 435 | fs.ensureDir(this.absolutePath); |
| 436 | } catch { |
| 437 | // read-only filesystem — read-only operations (e.g. `getPending` with a |
| 438 | // snapshot) may still succeed; write operations will fail on their own |
| 439 | } |
| 440 | } |
| 441 | |
| 442 | protected initServices(): void { |
| 443 | this.runner = this.createRunner(); |
nothing calls this directly
no test coverage detected