Skip to content

Commit 3a3be78

Browse files
committed
fix: 防止安装脚本因为 tmp_file 不存在而报错
1 parent cda582b commit 3a3be78

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/install.ps1

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ try
1414
} catch
1515
{
1616
Write-Host "❌ Error: Failed to download the file: $_"
17-
Remove-Item -Path $TMP_FILE
17+
if (Test-Path $TMP_FILE)
18+
{
19+
Remove-Item -Path $TMP_FILE
20+
}
1821
exit 1
1922
}
2023

0 commit comments

Comments
 (0)