Skip to content

Commit

Permalink
fix: windows conversion is cached before detectFileMoves
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Jul 18, 2024
1 parent c91bde7 commit c6f54ab
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/shared/local/localShadowRepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,11 @@ export class ShadowRepo {
filter: fileFilter(this.packageDirs),
});

// isomorphic-git stores things in unix-style tree. Convert to windows-style if necessary
if (IS_WINDOWS) {
this.status = this.status.map((row) => [path.normalize(row[FILE]), row[HEAD], row[WORKDIR], row[3]]);
}

// Check for moved files and update local git status accordingly
if (env.getBoolean('SF_BETA_TRACK_FILE_MOVES') === true) {
await Lifecycle.getInstance().emitTelemetry({ eventName: 'moveFileDetectionEnabled' });
Expand All @@ -165,10 +170,7 @@ export class ShadowRepo {
} catch (e) {
redirectToCliRepoError(e);
}
// isomorphic-git stores things in unix-style tree. Convert to windows-style if necessary
if (IS_WINDOWS) {
this.status = this.status.map((row) => [path.normalize(row[FILE]), row[HEAD], row[WORKDIR], row[3]]);
}

marker?.stop();
}
this.logger.trace(`done: getStatus (noCache = ${noCache})`);
Expand Down

0 comments on commit c6f54ab

Please sign in to comment.