Skip to content

Commit c6f54ab

Browse files
committed
fix: windows conversion is cached before detectFileMoves
1 parent c91bde7 commit c6f54ab

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/shared/local/localShadowRepo.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ export class ShadowRepo {
153153
filter: fileFilter(this.packageDirs),
154154
});
155155

156+
// isomorphic-git stores things in unix-style tree. Convert to windows-style if necessary
157+
if (IS_WINDOWS) {
158+
this.status = this.status.map((row) => [path.normalize(row[FILE]), row[HEAD], row[WORKDIR], row[3]]);
159+
}
160+
156161
// Check for moved files and update local git status accordingly
157162
if (env.getBoolean('SF_BETA_TRACK_FILE_MOVES') === true) {
158163
await Lifecycle.getInstance().emitTelemetry({ eventName: 'moveFileDetectionEnabled' });
@@ -165,10 +170,7 @@ export class ShadowRepo {
165170
} catch (e) {
166171
redirectToCliRepoError(e);
167172
}
168-
// isomorphic-git stores things in unix-style tree. Convert to windows-style if necessary
169-
if (IS_WINDOWS) {
170-
this.status = this.status.map((row) => [path.normalize(row[FILE]), row[HEAD], row[WORKDIR], row[3]]);
171-
}
173+
172174
marker?.stop();
173175
}
174176
this.logger.trace(`done: getStatus (noCache = ${noCache})`);

0 commit comments

Comments
 (0)