This commit is contained in:
@@ -60,7 +60,7 @@ run_with_progress() {
|
|||||||
echo -n "$description: "
|
echo -n "$description: "
|
||||||
while kill -0 $pid 2>/dev/null; do
|
while kill -0 $pid 2>/dev/null; do
|
||||||
i=$(( (i+1) % 10 ))
|
i=$(( (i+1) % 10 ))
|
||||||
printf "\r$description: ${COLOR_BLUE}${spin:$i:1}${COLOR_RESET} 处理中..."
|
printf "\r%s: %b%s%b 处理中..." "$description" "${COLOR_BLUE}" "${spin:$i:1}" "${COLOR_RESET}"
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -69,9 +69,9 @@ run_with_progress() {
|
|||||||
local exit_code=$?
|
local exit_code=$?
|
||||||
|
|
||||||
if [ $exit_code -eq 0 ]; then
|
if [ $exit_code -eq 0 ]; then
|
||||||
printf "\r$description: ${COLOR_GREEN}✓${COLOR_RESET} 完成\n"
|
printf "\r%s: %b✓%b 完成\n" "$description" "${COLOR_GREEN}" "${COLOR_RESET}"
|
||||||
else
|
else
|
||||||
printf "\r$description: ${COLOR_RED}✗${COLOR_RESET} 失败\n"
|
printf "\r%s: %b✗%b 失败\n" "$description" "${COLOR_RED}" "${COLOR_RESET}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return $exit_code
|
return $exit_code
|
||||||
@@ -264,6 +264,7 @@ install_python_dependencies() {
|
|||||||
log_info "安装 Python 依赖包..."
|
log_info "安装 Python 依赖包..."
|
||||||
|
|
||||||
# 激活虚拟环境
|
# 激活虚拟环境
|
||||||
|
# shellcheck source=/dev/null
|
||||||
source "$VENV_NAME/bin/activate" || {
|
source "$VENV_NAME/bin/activate" || {
|
||||||
log_error "激活虚拟环境失败"
|
log_error "激活虚拟环境失败"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -321,6 +322,7 @@ generate_config() {
|
|||||||
|
|
||||||
# 确保虚拟环境已激活
|
# 确保虚拟环境已激活
|
||||||
if [ -z "${VIRTUAL_ENV:-}" ]; then
|
if [ -z "${VIRTUAL_ENV:-}" ]; then
|
||||||
|
# shellcheck source=/dev/null
|
||||||
source "$VENV_NAME/bin/activate"
|
source "$VENV_NAME/bin/activate"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user