fix: use Get-Command for PATH executables like ffmpeg

This commit is contained in:
tian 2026-07-20 14:15:34 +08:00
parent 33fadd17bd
commit 51079466a3

View File

@ -37,7 +37,8 @@ function Write-Banner {
function Start-Detached {
param([string]$Name, [string]$Exe, [string[]]$Args)
if (-not (Test-Path $Exe)) {
$found = (Test-Path $Exe) -or (Get-Command $Exe -ErrorAction SilentlyContinue)
if (-not $found) {
Write-Host " [SKIP] $Name : 未找到 $Exe" -ForegroundColor Yellow
return $null
}