mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-21 16:02:28 +00:00
116b9e7db3
The dnt polyfill's import-meta-ponyfill doesn't resolve symlinks when comparing process.argv[1] with import.meta.url. When npm creates a symlink for the `wmill` bin (e.g., /usr/bin/wmill -> .../main.js), the paths don't match and isMain() incorrectly returns false, causing the CLI to silently exit without running. This fix resolves symlinks using fs.realpathSync() before comparison, ensuring the CLI works correctly when invoked via npm-installed symlinks. Tested with Node.js 20 and 25. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>