Run Windows training agent without console
This commit is contained in:
@@ -40,6 +40,15 @@ function Resolve-Python {
|
||||
throw "Python was not found. Create .venv or install Python 3.12."
|
||||
}
|
||||
|
||||
function Resolve-WindowlessPython {
|
||||
$python = Resolve-Python
|
||||
$pythonw = Join-Path (Split-Path -Parent $python) "pythonw.exe"
|
||||
if (Test-Path $pythonw) {
|
||||
return $pythonw
|
||||
}
|
||||
return $python
|
||||
}
|
||||
|
||||
if ($ApiAuth) {
|
||||
[Environment]::SetEnvironmentVariable("TRADEBOT_API_AUTH", $ApiAuth, "User")
|
||||
$env:TRADEBOT_API_AUTH = $ApiAuth
|
||||
@@ -59,7 +68,7 @@ if (-not $KeepLegacyRetrainer) {
|
||||
}
|
||||
}
|
||||
|
||||
$python = Resolve-Python
|
||||
$python = Resolve-WindowlessPython
|
||||
$currentUser = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name
|
||||
$arguments = @(
|
||||
"-u",
|
||||
|
||||
Reference in New Issue
Block a user