fix(install): skip git/tarball when package.json already present (offline BOX)
Made-with: Cursor
This commit is contained in:
@@ -119,8 +119,10 @@ info "安装到 $INSTALL_DIR ..."
|
|||||||
mkdir -p "$INSTALL_DIR"
|
mkdir -p "$INSTALL_DIR"
|
||||||
cd "$INSTALL_DIR"
|
cd "$INSTALL_DIR"
|
||||||
|
|
||||||
# 下载源码
|
# 下载源码(若目录已有 package.json,视为离线/已解压部署,跳过 git/tarball;避免设备无法访问 github.com)
|
||||||
if command -v git &>/dev/null; then
|
if [ -f "package.json" ]; then
|
||||||
|
info "检测到已有源码,跳过 git/tarball 下载"
|
||||||
|
elif command -v git &>/dev/null; then
|
||||||
if [ -d ".git" ]; then
|
if [ -d ".git" ]; then
|
||||||
git pull --quiet
|
git pull --quiet
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user