fix: 修复 fix-electron.sh 脚本路径问题
This commit is contained in:
Generated
+1
@@ -14,6 +14,7 @@
|
||||
"pinia": "^3.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"@vitejs/plugin-vue": "^5.2.0",
|
||||
"electron": "^43.0.0",
|
||||
"electron-builder": "^26.15.3",
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#!/bin/bash
|
||||
# scripts/fix-electron.sh - 自动修复 Electron 二进制文件
|
||||
|
||||
cd "$(dirname "$0")/.." || exit 1
|
||||
|
||||
ELECTRON_DIR="node_modules/electron"
|
||||
ELECTRON_VERSION=$(node -e "console.log(require('$ELECTRON_DIR/package.json').version)" 2>/dev/null)
|
||||
ELECTRON_VERSION=$(node -e "console.log(require('./$ELECTRON_DIR/package.json').version)" 2>/dev/null)
|
||||
|
||||
if [ -z "$ELECTRON_VERSION" ]; then
|
||||
echo "❌ 未找到 electron 包"
|
||||
exit 1
|
||||
echo "❌ 未找到 electron 包,跳过"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 检查是否已安装
|
||||
|
||||
Reference in New Issue
Block a user