(inputPath: string, options: PathResolutionOptions = {})
| 12 | } |
| 13 | |
| 14 | export function expandUserHomePath(inputPath: string, options: PathResolutionOptions = {}): string { |
| 15 | if (inputPath === '~') return resolveHomeDirectory(options.env); |
| 16 | if (inputPath.startsWith('~/')) { |
| 17 | return path.join(resolveHomeDirectory(options.env), inputPath.slice(2)); |
| 18 | } |
| 19 | return inputPath; |
| 20 | } |
| 21 | |
| 22 | export function resolveUserPath(inputPath: string, options: PathResolutionOptions = {}): string { |
| 23 | const expandedPath = expandUserHomePath(inputPath, options); |
no test coverage detected