Update for fix lower func cannot be used in EOF

This commit is contained in:
Tianyong Qiu 2025-02-19 15:33:15 +08:00
parent dd10b3b062
commit f1af132c2a

View File

@ -1187,7 +1187,7 @@ pushd /home/.devbox/freeleaps/frontend
export VITE_API_URL='http://127.0.0.1:8002' export VITE_API_URL='http://127.0.0.1:8002'
export VITE_WEBSOCKET_URL='http://127.0.0.1:8002' export VITE_WEBSOCKET_URL='http://127.0.0.1:8002'
if [[ "\$(lower "\$USE_LOCAL_COMPONENT")" == "true" ]]; then if [[ \$USE_LOCAL_COMPONENT_VAL == true ]]; then
export VITE_PROXY_WEBSOCKET_CHAT_URL='ws://localhost:8012' export VITE_PROXY_WEBSOCKET_CHAT_URL='ws://localhost:8012'
export VITE_PROXY_API_CHAT_URL='http://localhost:8012' export VITE_PROXY_API_CHAT_URL='http://localhost:8012'
else else
@ -1363,9 +1363,11 @@ devbox_deinit_command() {
# Clear the DevBox container logs # Clear the DevBox container logs
if [[ "$CLEAR_LOGS" == "true" ]]; then if [[ "$CLEAR_LOGS" == "true" ]]; then
echo "==> Clearing logs in $WORKING_HOME/logs..." echo "==> Clearing logs in $WORKING_HOME/logs..."
if [[ -d "$WORKING_HOME/logs" ]]; then
sudo chown -R $(whoami):$(whoami) "$WORKING_HOME/logs" sudo chown -R $(whoami):$(whoami) "$WORKING_HOME/logs"
rm -rf "$WORKING_HOME/logs" 2>/dev/null || true rm -rf "$WORKING_HOME/logs" 2>/dev/null || true
mkdir -p "$WORKING_HOME/logs" 2>/dev/null || true mkdir -p "$WORKING_HOME/logs" 2>/dev/null || true
fi
else else
echo "==> Skipping log clearing." echo "==> Skipping log clearing."
fi fi
@ -1380,10 +1382,26 @@ devbox_deinit_command() {
echo "==> Skipping repository deletion." echo "==> Skipping repository deletion."
fi fi
if [[ "$CLEAR_LOGS" == "true" ]]; then
# Check if logs directory is removed
if [[ -d "$WORKING_HOME/logs" ]]; then
echo "[WARNING] $WORKING_HOME/logs still exists after removal."
rm -rf "$WORKING_HOME/logs"
else
echo "==> Logs directory removed successfully."
fi
fi
# Sleep 5 seconds to allow the services to stop, for each second echo 5 seconds increase from 1 to 5 in each second by -
for i in {1..5}; do
echo -n "="
sleep 1
done
# Remove the use-local-component file # Remove the use-local-component file
rm -f "$WORKING_HOME/.use-local-component" rm -f "$WORKING_HOME/.use-local-component"
echo "==> DevBox deinitialization completed." echo "> DevBox deinitialization completed."
} }
# :command.function # :command.function