(input: DerivedDataPathInput = {})
| 31 | } |
| 32 | |
| 33 | export function resolveEffectiveDerivedDataPath(input: DerivedDataPathInput = {}): string { |
| 34 | const cwd = input.cwd ?? process.cwd(); |
| 35 | const explicitDerivedDataPath = getNonEmptyPath(input.derivedDataPath); |
| 36 | if (explicitDerivedDataPath) { |
| 37 | return resolvePathFromCwd(explicitDerivedDataPath, cwd); |
| 38 | } |
| 39 | |
| 40 | const workspacePath = getNonEmptyPath(input.workspacePath); |
| 41 | if (workspacePath) { |
| 42 | return computeScopedDerivedDataPath(workspacePath, cwd); |
| 43 | } |
| 44 | |
| 45 | const projectPath = getNonEmptyPath(input.projectPath); |
| 46 | if (projectPath) { |
| 47 | return computeScopedDerivedDataPath(projectPath, cwd); |
| 48 | } |
| 49 | |
| 50 | return resolveWorkspaceDerivedDataRoot(cwd); |
| 51 | } |
no test coverage detected