mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
Commit 00e057bf44 (#4727) simplified
node-wrapper to a one-line wrapper script for performance. Copying
the binary was proposed and rejected because node finds some of its
modules relative to its own path. But a symlink doesn’t have that
issue, as you can verify with
node -e 'console.log(require.resolve.paths("foo"))'
(To find its own path, node uses `process.execPath`, which resolves
symlinks, and there’s no plausible reason for that behavior to change.
https://github.com/nodejs/node/blob/v8.11.1/lib/module.js#L708-L717
https://github.com/nodejs/node/blob/v10.7.0/lib/internal/modules/cjs/loader.js#L761-L770)
Signed-off-by: Anders Kaseorg <andersk@mit.edu>