mirror of
https://github.com/SillyTavern/SillyTavern-Launcher.git
synced 2026-01-26 17:09:44 +00:00
launcher upgrades
+added ability to clear npm cache
This commit is contained in:
20
bin/functions/Toolbox/Troubleshooting/remove_npm_cache.bat
Normal file
20
bin/functions/Toolbox/Troubleshooting/remove_npm_cache.bat
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
|
||||
:remove_npm_cache
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Clearing npm cache...
|
||||
npm cache clean --force
|
||||
if %errorlevel% neq 0 (
|
||||
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Could not clear npm cache.%reset%
|
||||
echo Please try again.
|
||||
pause
|
||||
goto :npm_exit
|
||||
)
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%npm cache cleared successfully.%reset%
|
||||
pause
|
||||
|
||||
:npm_exit
|
||||
if "%caller%"=="home" (
|
||||
exit /b 1
|
||||
) else (
|
||||
exit /b 0
|
||||
)
|
||||
@@ -4,12 +4,12 @@
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% Clearing pip cache...
|
||||
pip cache purge
|
||||
if %errorlevel% neq 0 (
|
||||
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Could not clear the pip cache.%reset%
|
||||
echo %red_bg%[%time%]%reset% %red_fg_strong%[ERROR] Could not clear pip cache.%reset%
|
||||
echo Please try again.
|
||||
pause
|
||||
goto :pip_exit
|
||||
)
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%The pip cache has been cleared successfully.%reset%
|
||||
echo %blue_bg%[%time%]%reset% %blue_fg_strong%[INFO]%reset% %green_fg_strong%pip cache cleared successfully.%reset%
|
||||
pause
|
||||
|
||||
:pip_exit
|
||||
|
||||
Reference in New Issue
Block a user