File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -491,8 +491,11 @@ export class LocalRuntime implements Runtime {
491491 const deletedPath = this . getWorkspacePath ( projectPath , workspaceName ) ;
492492
493493 // Check if directory exists - if not, operation is idempotent
494- if ( ! fs . existsSync ( deletedPath ) ) {
495- // Directory already gone - prune stale git records (best effort)
494+ try {
495+ await fsPromises . access ( deletedPath ) ;
496+ } catch {
497+ // Directory doesn't exist - operation is idempotent
498+ // Prune stale git records (best effort)
496499 try {
497500 using pruneProc = execAsync ( `git -C "${ projectPath } " worktree prune` ) ;
498501 await pruneProc . result ;
Original file line number Diff line number Diff line change @@ -974,20 +974,18 @@ export class SSHRuntime implements Runtime {
974974 }
975975 }
976976
977- async forkWorkspace ( _params : WorkspaceForkParams ) : Promise < WorkspaceForkResult > {
977+ forkWorkspace ( _params : WorkspaceForkParams ) : Promise < WorkspaceForkResult > {
978978 // SSH forking is not yet implemented due to unresolved complexities:
979979 // - Users expect the new workspace's filesystem state to match the remote workspace,
980980 // not the local project (which may be out of sync or on a different commit)
981981 // - This requires: detecting the branch, copying remote state, handling uncommitted changes
982982 // - For now, users should create a new workspace from the desired branch instead
983- return {
983+ return Promise . resolve ( {
984984 success : false ,
985985 error : "Forking SSH workspaces is not yet implemented. Create a new workspace instead." ,
986- } ;
987- }
988-
986+ } ) ;
989987 }
990-
988+ }
991989
992990/**
993991 * Helper to convert a ReadableStream to a string
Original file line number Diff line number Diff line change @@ -552,8 +552,10 @@ export class IpcMain {
552552 const projectName = sourceMetadata . projectName ;
553553
554554 // Create runtime for source workspace
555- const sourceRuntimeConfig =
556- sourceMetadata . runtimeConfig ?? { type : "local" , srcBaseDir : this . config . srcDir } ;
555+ const sourceRuntimeConfig = sourceMetadata . runtimeConfig ?? {
556+ type : "local" ,
557+ srcBaseDir : this . config . srcDir ,
558+ } ;
557559 const runtime = createRuntime ( sourceRuntimeConfig ) ;
558560
559561 // Generate stable workspace ID for the new workspace
You can’t perform that action at this time.
0 commit comments