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 @@ -481,8 +481,11 @@ export class LocalRuntime implements Runtime {
481481 const deletedPath = this . getWorkspacePath ( projectPath , workspaceName ) ;
482482
483483 // Check if directory exists - if not, operation is idempotent
484- if ( ! fs . existsSync ( deletedPath ) ) {
485- // Directory already gone - prune stale git records (best effort)
484+ try {
485+ await fsPromises . access ( deletedPath ) ;
486+ } catch {
487+ // Directory doesn't exist - operation is idempotent
488+ // Prune stale git records (best effort)
486489 try {
487490 using pruneProc = execAsync ( `git -C "${ projectPath } " worktree prune` ) ;
488491 await pruneProc . result ;
Original file line number Diff line number Diff line change @@ -898,20 +898,18 @@ export class SSHRuntime implements Runtime {
898898 }
899899 }
900900
901- async forkWorkspace ( _params : WorkspaceForkParams ) : Promise < WorkspaceForkResult > {
901+ forkWorkspace ( _params : WorkspaceForkParams ) : Promise < WorkspaceForkResult > {
902902 // SSH forking is not yet implemented due to unresolved complexities:
903903 // - Users expect the new workspace's filesystem state to match the remote workspace,
904904 // not the local project (which may be out of sync or on a different commit)
905905 // - This requires: detecting the branch, copying remote state, handling uncommitted changes
906906 // - For now, users should create a new workspace from the desired branch instead
907- return {
907+ return Promise . resolve ( {
908908 success : false ,
909909 error : "Forking SSH workspaces is not yet implemented. Create a new workspace instead." ,
910- } ;
911- }
912-
910+ } ) ;
913911 }
914-
912+ }
915913
916914/**
917915 * Helper to convert a ReadableStream to a string
Original file line number Diff line number Diff line change @@ -528,8 +528,10 @@ export class IpcMain {
528528 const projectName = sourceMetadata . projectName ;
529529
530530 // Create runtime for source workspace
531- const sourceRuntimeConfig =
532- sourceMetadata . runtimeConfig ?? { type : "local" , srcBaseDir : this . config . srcDir } ;
531+ const sourceRuntimeConfig = sourceMetadata . runtimeConfig ?? {
532+ type : "local" ,
533+ srcBaseDir : this . config . srcDir ,
534+ } ;
533535 const runtime = createRuntime ( sourceRuntimeConfig ) ;
534536
535537 // Generate stable workspace ID for the new workspace
You can’t perform that action at this time.
0 commit comments