(cwd: string)
| 39 | } |
| 40 | |
| 41 | getCurrentProfileName(cwd: string): string { |
| 42 | const configPaths = this.getConfigPaths(cwd); |
| 43 | const currentPath = path.join(configPaths.configDir, "current"); |
| 44 | if (!this.fs.existsSync(currentPath)) { |
| 45 | return "default"; |
| 46 | } |
| 47 | const raw = this.fs.readFileSync(currentPath, "utf-8").trim(); |
| 48 | return raw || "default"; |
| 49 | } |
| 50 | |
| 51 | getCurrentProfile(cwd: string): Profile | undefined { |
| 52 | const currentName = this.getCurrentProfileName(cwd); |
no test coverage detected