Use custom init script instead of postinstall (#5384)
* Use custom init script instead of postinstall * Revert changes to start scripts in src\electron * feat: add --ignore-scripts flag to npm install commands in batch and shell scripts * feat: add --ignore-scripts flag to npm ci in Dockerfile
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Function to handle startup logic (Config check + Postinstall + Start)
|
||||
# Function to handle startup logic (Config check + init + Start)
|
||||
start_sillytavern() {
|
||||
local PREFIX="$1"
|
||||
shift # Remove the first argument (PREFIX) so $@ contains the rest
|
||||
@@ -11,8 +11,8 @@ start_sillytavern() {
|
||||
$PREFIX cp "default/config.yaml" "config/config.yaml"
|
||||
fi
|
||||
|
||||
# Execute postinstall to auto-populate config.yaml with missing values
|
||||
$PREFIX npm run postinstall
|
||||
# Execute init script to auto-populate config.yaml with missing values
|
||||
$PREFIX npm run init
|
||||
|
||||
# Start the server
|
||||
exec $PREFIX node server.js --listen "$@"
|
||||
|
||||
Reference in New Issue
Block a user