Skip to content

fix: windows main module detection for migrate.ts and seed.ts#3

Open
goodvecn-dev wants to merge 1 commit into
Zleap-AI:mainfrom
goodvecn-dev:fix/windows-main-module-detection
Open

fix: windows main module detection for migrate.ts and seed.ts#3
goodvecn-dev wants to merge 1 commit into
Zleap-AI:mainfrom
goodvecn-dev:fix/windows-main-module-detection

Conversation

@goodvecn-dev

Copy link
Copy Markdown

The import.meta.url === file:// check fails on Windows because file URL uses forward slashes while process.argv[1] uses backslashes. Fixed by normalizing both paths with fileURLToPath + path.resolve before comparison.

The import.meta.url === file:// check fails on Windows because file URL uses forward slashes while process.argv[1] uses backslashes. Fixed by normalizing both paths with fileURLToPath + path.resolve before comparison.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants