@cannbot-ai/install-helper 0.0.2-beta.72 → 0.0.2-beta.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/install.ps1 +9 -9
  2. package/package.json +6 -6
package/dist/install.ps1 CHANGED
@@ -22,7 +22,7 @@ trap {
22
22
  Write-Host ""
23
23
  Write-Host " Press Enter to exit..."
24
24
  Read-Host
25
- exit 1
25
+ return
26
26
  }
27
27
 
28
28
  function Compare-SemVer($a, $b) {
@@ -84,14 +84,14 @@ if ($hasNode) {
84
84
  Write-Host " [OK] 安装成功!" -ForegroundColor Green
85
85
  Write-Host ""
86
86
  Write-Host " 请运行: install-helper" -ForegroundColor Cyan
87
- exit 0
87
+ return
88
88
  } else {
89
89
  Write-Host ""
90
90
  Write-Host " [ERROR] npm 安装失败" -ForegroundColor Red
91
91
  Write-Host ""
92
92
  Write-Host " 请尝试以管理员权限运行:"
93
93
  Write-Host " npm install -g @cannbot-ai/install-helper"
94
- exit 1
94
+ return
95
95
  }
96
96
  }
97
97
 
@@ -148,7 +148,7 @@ if (-not $Version) {
148
148
  Write-Host ""
149
149
  Write-Host " Alternative (requires Node.js 18+):"
150
150
  Write-Host " npm install -g @cannbot-ai/install-helper"
151
- exit 1
151
+ return
152
152
  }
153
153
 
154
154
  # 3. Download tarball (with mirror fallback)
@@ -180,7 +180,7 @@ if (-not $Downloaded) {
180
180
  Write-Host ""
181
181
  Write-Host " Alternative (requires Node.js 18+):"
182
182
  Write-Host " npm install -g @cannbot-ai/install-helper"
183
- exit 1
183
+ return
184
184
  }
185
185
 
186
186
  # 4. Extract
@@ -190,7 +190,7 @@ $TempExtract = Join-Path $env:TEMP "ih-extract-$(Get-Random)"
190
190
  New-Item -ItemType Directory -Force -Path $TempExtract | Out-Null
191
191
 
192
192
  try {
193
- & tar xzf $TempFile -C $TempExtract 2>&1 | Out-Null
193
+ & tar xzf $TempFile -C $TempExtract 2>$null
194
194
  if ($LASTEXITCODE -ne 0) {
195
195
  throw "tar exit code $LASTEXITCODE"
196
196
  }
@@ -199,7 +199,7 @@ try {
199
199
  Write-Host " Windows 10 1803+ includes tar. For older Windows, use npm install."
200
200
  Remove-Item $TempExtract -Recurse -Force -ErrorAction SilentlyContinue
201
201
  Remove-Item $TempFile -Force -ErrorAction SilentlyContinue
202
- exit 1
202
+ return
203
203
  }
204
204
 
205
205
  $BinarySrc = Join-Path $TempExtract "package\$BinaryName"
@@ -209,7 +209,7 @@ if (-not (Test-Path $BinarySrc)) {
209
209
  Write-Host " [ERROR] Binary not found in tarball: $BinarySrc" -ForegroundColor Red
210
210
  Remove-Item $TempExtract -Recurse -Force -ErrorAction SilentlyContinue
211
211
  Remove-Item $TempFile -Force -ErrorAction SilentlyContinue
212
- exit 1
212
+ return
213
213
  }
214
214
 
215
215
  Copy-Item $BinarySrc $BinaryDest -Force
@@ -233,7 +233,7 @@ if (-not $UserPath) {
233
233
 
234
234
  # 6. Verify binary and launch
235
235
  try {
236
- $null = & $BinaryDest --version 2>&1
236
+ $null = & $BinaryDest --version 2>$null
237
237
  Write-Host " Launching install-helper..." -ForegroundColor Cyan
238
238
  Write-Host ""
239
239
  & $BinaryDest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cannbot-ai/install-helper",
3
- "version": "0.0.2-beta.72",
3
+ "version": "0.0.2-beta.73",
4
4
  "description": "Install Helper - Interactive installer for CANN operator development skills",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,11 +42,11 @@
42
42
  "yaml": "^2.6.0"
43
43
  },
44
44
  "optionalDependencies": {
45
- "@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.72",
46
- "@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.72",
47
- "@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.72",
48
- "@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.72",
49
- "@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.72"
45
+ "@cannbot-ai/install-helper-linux-x64": "0.0.2-beta.73",
46
+ "@cannbot-ai/install-helper-linux-arm64": "0.0.2-beta.73",
47
+ "@cannbot-ai/install-helper-darwin-x64": "0.0.2-beta.73",
48
+ "@cannbot-ai/install-helper-darwin-arm64": "0.0.2-beta.73",
49
+ "@cannbot-ai/install-helper-windows-x64": "0.0.2-beta.73"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^22.0.0",