Skip to content

Commit 626a2fa

Browse files
committed
🤖 fix: use config path for script listing
Change-Id: Ie07e374927f5aa9a96369b56a995986506ee335b Signed-off-by: Thomas Kosiewski <tk@coder.com>
1 parent 7a6f6fa commit 626a2fa

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/node/services/ipcMain.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1740,17 +1740,19 @@ export class IpcMain {
17401740
return Err(`Workspace not found: ${workspaceId}`);
17411741
}
17421742

1743+
// Get actual workspace path from config (handles both legacy and new format)
1744+
const workspace = this.config.findWorkspace(workspaceId);
1745+
if (!workspace) {
1746+
return Err(`Workspace ${workspaceId} not found in config`);
1747+
}
1748+
const workspacePath = workspace.path;
1749+
17431750
const metadata = metadataResult.data;
17441751
const runtimeConfig = metadata.runtimeConfig ?? {
17451752
type: "local" as const,
17461753
srcBaseDir: this.config.srcDir,
17471754
};
17481755
const runtime = createRuntime(runtimeConfig);
1749-
// Handle in-place workspaces where projectPath === name
1750-
const isInPlace = metadata.projectPath === metadata.name;
1751-
const workspacePath = isInPlace
1752-
? metadata.projectPath
1753-
: runtime.getWorkspacePath(metadata.projectPath, metadata.name);
17541756

17551757
const scripts = await listScripts(runtime, workspacePath);
17561758
return Ok(scripts);

0 commit comments

Comments
 (0)