From 4651f59e2f24729aab361e63bdbf7fcb938ecb60 Mon Sep 17 00:00:00 2001 From: deffcolony <61471128+deffcolony@users.noreply.github.com> Date: Wed, 25 Sep 2024 13:52:23 +0200 Subject: [PATCH] launcher upgrades +use env variable one time for all --- Launcher.bat | 2 +- bin/functions/Toolbox/App_Launcher/Core_Utilities/start_st.bat | 2 +- .../Toolbox/App_Launcher/Core_Utilities/update_start_st.bat | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Launcher.bat b/Launcher.bat index 2fa87cc..05d9f2f 100644 --- a/Launcher.bat +++ b/Launcher.bat @@ -131,6 +131,7 @@ set "st_install_path=%~dp0SillyTavern" set "st_package_json_path=%st_install_path%\package.json" set "extras_install_path=%~dp0SillyTavern-extras" set "st_backup_path=%~dp0SillyTavern-backups" +set "NODE_ENV=production" REM Define variables for install locations (Image Generation) set "image_generation_dir=%~dp0image-generation" @@ -4676,7 +4677,6 @@ if %errorlevel% neq 0 ( pause goto :home ) -set NODE_ENV=production start cmd /k "title SillyTavern && cd /d %st_install_path% && call npm install --no-audit --no-fund --loglevel=error --no-progress --omit=dev && node server.js && pause && popd" echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% SillyTavern launched in a new window. diff --git a/bin/functions/Toolbox/App_Launcher/Core_Utilities/start_st.bat b/bin/functions/Toolbox/App_Launcher/Core_Utilities/start_st.bat index 3cf7c72..be6fba9 100644 --- a/bin/functions/Toolbox/App_Launcher/Core_Utilities/start_st.bat +++ b/bin/functions/Toolbox/App_Launcher/Core_Utilities/start_st.bat @@ -18,7 +18,7 @@ if %errorlevel% neq 0 ( exit /b 1 ) -set NODE_ENV=production +echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Node.js in: %cyan_fg_strong%%NODE_ENV% %reset% setlocal set "command=%~1" start /B cmd /C "%command%" diff --git a/bin/functions/Toolbox/App_Launcher/Core_Utilities/update_start_st.bat b/bin/functions/Toolbox/App_Launcher/Core_Utilities/update_start_st.bat index c05f438..d1ff00c 100644 --- a/bin/functions/Toolbox/App_Launcher/Core_Utilities/update_start_st.bat +++ b/bin/functions/Toolbox/App_Launcher/Core_Utilities/update_start_st.bat @@ -37,7 +37,7 @@ if %errorlevel% neq 0 ( ) echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%SillyTavern updated successfully.%reset% -set NODE_ENV=production +echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Running Node.js in: %cyan_fg_strong%%NODE_ENV% %reset% setlocal set "command=%~1" start /B cmd /C "%command%"