File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1049,6 +1049,7 @@ it.effect("restores empty checkpoints without changing paths outside the workspa
10491049 fallbackToHead : false ,
10501050 } ) ,
10511051 ) ;
1052+ assert . isTrue ( yield * fileSystem . exists ( cwd ) ) ;
10521053 assert . isFalse ( yield * fileSystem . exists ( addedPath ) ) ;
10531054 }
10541055 yield * fileSystem . writeFileString (
Original file line number Diff line number Diff line change @@ -1114,7 +1114,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
11141114 } ) ;
11151115 }
11161116 // Restoring away the last tracked file can remove a nested workspace directory.
1117- yield * fileSystem . makeDirectory ( input . cwd , { recursive : true } ) . pipe (
1117+ const recreateWorkspace = fileSystem . makeDirectory ( input . cwd , { recursive : true } ) . pipe (
11181118 Effect . mapError (
11191119 ( cause ) =>
11201120 new VcsProcessExitError ( {
@@ -1126,6 +1126,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
11261126 } ) ,
11271127 ) ,
11281128 ) ;
1129+ yield * recreateWorkspace ;
11291130 const cleaned = yield * execute ( {
11301131 operation,
11311132 cwd : input . cwd ,
@@ -1150,6 +1151,8 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* (
11501151 detail : cleaned . stderr . trim ( ) || "Could not clean the checkpoint workspace." ,
11511152 } ) ;
11521153 }
1154+ // On Windows the same clean can remove './' and exit 0.
1155+ yield * recreateWorkspace ;
11531156
11541157 const headExists = yield * hasHeadCommit ( input . cwd ) ;
11551158 if ( headExists ) {
You can’t perform that action at this time.
0 commit comments