fix: minio uses Start-Process directly instead of bat file

This commit is contained in:
tian 2026-07-22 09:31:25 +08:00
parent 848580f3ee
commit a110436e2d

View File

@ -150,9 +150,7 @@ function Invoke-Start {
Write-Banner "MinIO (object storage)" Write-Banner "MinIO (object storage)"
if (Test-Path $minio) { if (Test-Path $minio) {
if (-not (Test-Path $minioData)) { New-Item -ItemType Directory -Path $minioData -Force | Out-Null } if (-not (Test-Path $minioData)) { New-Item -ItemType Directory -Path $minioData -Force | Out-Null }
$minioBat = Join-Path $env:TEMP "safesight-minio.bat" Start-Process -FilePath $minio -ArgumentList "server", $minioData, "--address", ":9000", "--console-address", ":9001"
"@echo off`r`n`"$minio`" server `"$minioData`" --address :9000 --console-address :9001" | Out-File -FilePath $minioBat -Encoding ASCII
Start-Process "cmd" -ArgumentList "/k", $minioBat
Write-Host " Console: http://localhost:9001 (admin/password)" -ForegroundColor White Write-Host " Console: http://localhost:9001 (admin/password)" -ForegroundColor White
} }