|
@@ -32,9 +32,12 @@ fi
|
|
|
# builds that use npm would be incorrectly routed to bun, causing ABI
|
|
# builds that use npm would be incorrectly routed to bun, causing ABI
|
|
|
# mismatches with better-sqlite3 / sqlite-vec (see #381).
|
|
# mismatches with better-sqlite3 / sqlite-vec (see #381).
|
|
|
if [ -f "$DIR/package-lock.json" ]; then
|
|
if [ -f "$DIR/package-lock.json" ]; then
|
|
|
- exec node "$DIR/dist/cli/qmd.js" "$@"
|
|
|
|
|
|
|
+ # Keep the package-visible path when Oivo relocates dist/ behind a symlink.
|
|
|
|
|
+ # ESM otherwise resolves imported packages beside the real dist target and
|
|
|
|
|
+ # misses this checkout's node_modules (fast-glob, picomatch, ...).
|
|
|
|
|
+ exec node --preserve-symlinks --preserve-symlinks-main "$DIR/dist/cli/qmd.js" "$@"
|
|
|
elif [ -f "$DIR/bun.lock" ] || [ -f "$DIR/bun.lockb" ]; then
|
|
elif [ -f "$DIR/bun.lock" ] || [ -f "$DIR/bun.lockb" ]; then
|
|
|
exec bun "$DIR/dist/cli/qmd.js" "$@"
|
|
exec bun "$DIR/dist/cli/qmd.js" "$@"
|
|
|
else
|
|
else
|
|
|
- exec node "$DIR/dist/cli/qmd.js" "$@"
|
|
|
|
|
|
|
+ exec node --preserve-symlinks --preserve-symlinks-main "$DIR/dist/cli/qmd.js" "$@"
|
|
|
fi
|
|
fi
|