Merge pull request #2135 from johnflux/staging

Fix SillyTavern being launched from a different working directory
This commit is contained in:
Cohee
2024-04-26 22:06:40 +03:00
committed by GitHub

View File

@@ -1,5 +1,8 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# Make sure pwd is the directory of the script
cd "$(dirname "$0")"
if ! command -v npm &> /dev/null if ! command -v npm &> /dev/null
then then
read -p "npm is not installed. Do you want to install nodejs and npm? (y/n)" choice read -p "npm is not installed. Do you want to install nodejs and npm? (y/n)" choice
@@ -26,4 +29,4 @@ export NODE_ENV=production
npm i --no-audit --no-fund --quiet --omit=dev npm i --no-audit --no-fund --quiet --omit=dev
echo "Entering SillyTavern..." echo "Entering SillyTavern..."
node "$(dirname "$0")/server.js" "$@" node "server.js" "$@"