| ... | @@ -1114,7 +1114,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* ( | ... | @@ -1114,7 +1114,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* ( |
| 1114 | }); | 1114 | }); |
| 1115 | } | 1115 | } |
| 1116 | // Restoring away the last tracked file can remove a nested workspace directory. | 1116 | // 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( |
| 1118 | Effect.mapError( | 1118 | Effect.mapError( |
| 1119 | (cause) => | 1119 | (cause) => |
| 1120 | new VcsProcessExitError({ | 1120 | new VcsProcessExitError({ |
| ... | @@ -1126,6 +1126,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* ( | ... | @@ -1126,6 +1126,7 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* ( |
| 1126 | }), | 1126 | }), |
| 1127 | ), | 1127 | ), |
| 1128 | ); | 1128 | ); |
| | 1129 | yield* recreateWorkspace; |
| 1129 | const cleaned = yield* execute({ | 1130 | const cleaned = yield* execute({ |
| 1130 | operation, | 1131 | operation, |
| 1131 | cwd: input.cwd, | 1132 | cwd: input.cwd, |
| ... | @@ -1150,6 +1151,8 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* ( | ... | @@ -1150,6 +1151,8 @@ export const makeVcsDriverShape = Effect.fn("makeGitVcsDriverShape")(function* ( |
| 1150 | detail: cleaned.stderr.trim() || "Could not clean the checkpoint workspace.", | 1151 | detail: cleaned.stderr.trim() || "Could not clean the checkpoint workspace.", |
| 1151 | }); | 1152 | }); |
| 1152 | } | 1153 | } |
| | 1154 | // On Windows the same clean can remove './' and exit 0. |
| | 1155 | yield* recreateWorkspace; |
| 1153 | | 1156 | |
| 1154 | const headExists = yield* hasHeadCommit(input.cwd); | 1157 | const headExists = yield* hasHeadCommit(input.cwd); |
| 1155 | if (headExists) { | 1158 | if (headExists) { |