fix: generate posix paths for migrations (#11468)

Fixes: FRMW-2913

Related Github issue - https://github.com/medusajs/medusa/issues/11330
This commit is contained in:
Harminder Virk
2025-02-17 15:27:00 +05:30
committed by GitHub
parent b53ea77658
commit 32c5015f56
4 changed files with 21 additions and 5 deletions
+2 -1
View File
@@ -81,4 +81,5 @@ export * from "./upper-case-first"
export * from "./validate-handle"
export * from "./wrap-handler"
export * from "./merge-plugin-modules"
export * from "./merge-metadata"
export * from "./to-unix-slash"
export * from "./merge-metadata"
@@ -0,0 +1,8 @@
export function toUnixSlash(path: string) {
const isExtendedLengthPath = path.startsWith("\\\\?\\")
if (isExtendedLengthPath) {
return path
}
return path.replace(/\\/g, "/")
}