Files
emdash-blog-template/test-node-modules/.bin/em
Kunthawat Greethong 160115faea Fix SQLite database path to match emdash init location
The emdash CLI creates the database at ./data.db relative to the
workspace root (/app/emdash/data.db), but the Astro config was
pointing to ./storage/data.db. This caused getEmDashEntry() to
return null since the database used at runtime was empty.

Change db.ts to use file:./data.db instead of file:./storage/data.db

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-04 07:33:27 +07:00

22 lines
1020 B
Bash
Executable File

#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*|*MINGW*|*MSYS*)
if command -v cygpath > /dev/null 2>&1; then
basedir=`cygpath -w "$basedir"`
fi
;;
esac
if [ -z "$NODE_PATH" ]; then
export NODE_PATH="/app/emdash/packages/core/dist/cli/node_modules:/app/emdash/packages/core/dist/node_modules:/app/emdash/packages/core/node_modules:/app/emdash/packages/node_modules:/app/emdash/node_modules:/app/node_modules:/node_modules:/app/emdash/node_modules/.pnpm/node_modules"
else
export NODE_PATH="/app/emdash/packages/core/dist/cli/node_modules:/app/emdash/packages/core/dist/node_modules:/app/emdash/packages/core/node_modules:/app/emdash/packages/node_modules:/app/emdash/node_modules:/app/node_modules:/node_modules:/app/emdash/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../emdash/dist/cli/index.mjs" "$@"
else
exec node "$basedir/../emdash/dist/cli/index.mjs" "$@"
fi