feat: 调整启用脚本
This commit is contained in:
parent
79183a73db
commit
3117bf518c
12
start.sh
12
start.sh
|
|
@ -1,7 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
# ---- 加载 nvm ----
|
||||||
|
export NVM_DIR="$HOME/.nvm"
|
||||||
|
if [ -s "$NVM_DIR/nvm.sh" ]; then
|
||||||
|
\. "$NVM_DIR/nvm.sh" # 这是必须的
|
||||||
|
else
|
||||||
|
echo "Error: nvm.sh not found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# 切换 Node.js 版本
|
# 切换 Node.js 版本
|
||||||
nvm use v22.18.0
|
nvm use v22.18.0 || { echo "Failed to switch Node.js version"; exit 1; }
|
||||||
|
|
||||||
# 激活 Python 虚拟环境
|
# 激活 Python 虚拟环境
|
||||||
source backend/venv/bin/activate
|
source backend/venv/bin/activate
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue