Skip to content

Commit 3fc67d3

Browse files
committed
windows fix
1 parent 154e8a4 commit 3fc67d3

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/all-combinations.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,16 @@ console.log("All combinations tested!");
121121
// Check if there are Git changes in the tests/components directory
122122
try {
123123
console.log("Checking for Git changes in tests/components...");
124-
const gitStatus = execSync(`git status --porcelain tests/components`, {
124+
const gitDiff = execSync(`git diff --ignore-cr-at-eol tests/components`, {
125125
encoding: "utf-8",
126126
});
127127

128-
if (gitStatus.trim()) {
128+
if (gitDiff.trim()) {
129129
console.error(
130130
"❌ Error: Git changes detected in tests/components directory!",
131131
);
132-
console.error(gitStatus);
132+
console.error("\n📋 Git diff:");
133+
console.error(gitDiff);
133134
console.error("Please commit these changes or update the expected output.");
134135
process.exit(1);
135136
}

src/transformer.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type Flags = {
3838
};
3939

4040
const get = async (globPattern: string): Promise<File[]> => {
41-
const files = await glob(globPattern);
41+
const files = await glob(globPattern.replace(/\\/g, '/'), { posix: true });
4242
return files
4343
.sort()
4444
.reverse()
@@ -60,8 +60,6 @@ const shortenFilenames = (sourcePath: string, files: File[]): File[] => {
6060
}));
6161
};
6262

63-
const noop = (s: string): string => s;
64-
6563
export const transformSvg = (
6664
svg: string,
6765
options: {

0 commit comments

Comments
 (0)