(filePath: string)
| 745 | } |
| 746 | |
| 747 | override async resolvePath(filePath: string): Promise<string> { |
| 748 | let expanded = this.expandTildeForContainer(filePath); |
| 749 | |
| 750 | if (this.hasUnexpandedTilde(expanded)) { |
| 751 | await this.fetchRemoteHome(); |
| 752 | if (this.remoteHomeDir) { |
| 753 | expanded = filePath === "~" ? this.remoteHomeDir : this.remoteHomeDir + filePath.slice(1); |
| 754 | } else { |
| 755 | throw new RuntimeError( |
| 756 | `Failed to resolve path ${filePath}: container home directory unavailable`, |
| 757 | "exec" |
| 758 | ); |
| 759 | } |
| 760 | } |
| 761 | |
| 762 | // Resolve relative paths against container workspace (avoid host cwd leakage) |
| 763 | if (!expanded.startsWith("/")) { |
| 764 | const basePath = this.remoteWorkspaceFolder ?? "/"; |
| 765 | return path.posix.resolve(basePath, expanded); |
| 766 | } |
| 767 | |
| 768 | // For absolute paths, resolve using posix (container is Linux) |
| 769 | return path.posix.resolve(expanded); |
| 770 | } |
| 771 | |
| 772 | override tempDir(): Promise<string> { |
| 773 | const workspaceRoot = this.remoteWorkspaceFolder ?? this.currentWorkspacePath; |
nothing calls this directly
no test coverage detected