fix: Yarn installation fails in windows due to mixed path separators … (#26771)

* fix: Yarn installation fails in windows due to mixed path separators in app-store-cli

* fix: normalize paths for cross-platform Biome compatibility in app-store-cli
This commit is contained in:
Anshumancanrock
2026-01-13 18:07:51 +00:00
committed by GitHub
parent 455973b394
commit 36cf6e3703
+5 -2
View File
@@ -15,12 +15,15 @@ const isInWatchMode = process.argv[2] === "--watch";
const repoRoot = path.resolve(__dirname, "../../..");
const formatFileWithBiome = (filePath: string) => {
// Normalize to forward slashes for cross-platform Biome compatibility
const normalizedPath = filePath.replace(/\\/g, "/");
const { status } = spawnSync(
"yarn",
["biome", "format", "--write", "--no-errors-on-unmatched", filePath],
["biome", "format", "--write", "--no-errors-on-unmatched", normalizedPath],
{
stdio: "inherit",
cwd: repoRoot,
shell: true,
}
);
@@ -561,7 +564,7 @@ function generateFiles() {
["video.adapters.generated.ts", videoOutput],
];
filesToGenerate.forEach(([fileName, output]) => {
const filePath = `${APP_STORE_PATH}/${fileName}`;
const filePath = path.join(APP_STORE_PATH, fileName);
fs.writeFileSync(filePath, formatOutput(`${banner}${output.join("\n")}`));
formatFileWithBiome(filePath);
});