Skip to content

Commit

Permalink
Fix repository field generation on Windows (#2218)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshwooding committed Dec 9, 2022
1 parent 4a541a9 commit 15a417c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/large-icons-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'modular-scripts': patch
---

Fix repository field generation on Windows
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ async function getRelativePathInRepo(packagePath: string) {
['rev-parse', '--show-toplevel'],
{ stdout: 'pipe' },
);
return path.relative(gitRepoPath, packagePath);
return path
.relative(gitRepoPath, packagePath)
.split(path.win32.sep)
.join(path.posix.sep);
}

export async function getRepositoryField(packagePath: string) {
Expand Down

0 comments on commit 15a417c

Please sign in to comment.