(context, configuredPath)
| 298 | } |
| 299 | |
| 300 | function resolveCliPath(context, configuredPath) { |
| 301 | if (configuredPath) { |
| 302 | return configuredPath; |
| 303 | } |
| 304 | |
| 305 | const workspaceFolders = vscode.workspace.workspaceFolders ?? []; |
| 306 | for (const folder of workspaceFolders) { |
| 307 | const candidate = path.join(folder.uri.fsPath, "build", "simdeck"); |
| 308 | if (fs.existsSync(candidate)) { |
| 309 | return candidate; |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | const extensionWorkspaceCandidate = path.resolve( |
| 314 | context.extensionPath, |
| 315 | "..", |
| 316 | "..", |
| 317 | "build", |
| 318 | "simdeck", |
| 319 | ); |
| 320 | if (fs.existsSync(extensionWorkspaceCandidate)) { |
| 321 | return extensionWorkspaceCandidate; |
| 322 | } |
| 323 | |
| 324 | return "simdeck"; |
| 325 | } |
| 326 | |
| 327 | function resolveWorkingDirectory(context) { |
| 328 | const workspaceFolders = vscode.workspace.workspaceFolders ?? []; |
no outgoing calls
no test coverage detected