فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(windows-vm): keep PowerShell progress output out of path and result return values
davoodmehraban89 committed
Oct 16, 2026 at 18:19 UTC
c8affdd127eb34d64100aa25a6dcded8a5ef3529
1 file changed
+3
-3
scripts/windows-vm-native-lab.ps1
+3
-3
@@ -36,7 +36,7 @@ function Install-NSIS([string]$installer,[string]$directory) {
36
if ($directory.Contains(' ')) { throw 'Use a disposable NSIS test path without spaces' }
37
New-Item -ItemType Directory -Force -Path $directory | Out-Null
38
$args = @('/S',("/D=" + $directory))
39
- Write-Output ("Installing " + (Split-Path $installer -Leaf) + ' to ' + $directory)
39
+ Write-Host ("Installing " + (Split-Path $installer -Leaf) + ' to ' + $directory)
40
$process = Start-Process -FilePath $installer -ArgumentList $args -PassThru
41
try {
42
if (-not $process.WaitForExit(150000)) {
@@ -52,7 +52,7 @@ function Install-NSIS([string]$installer,[string]$directory) {
52
if (-not $candidate) {
53
$discovered = @(Get-ChildItem -LiteralPath $directory -Recurse -File -ErrorAction SilentlyContinue |
54
Select-Object -First 15 -ExpandProperty FullName)
55
- Write-Output ("NSIS installation contents: " + ($discovered -join '; '))
55
+ Write-Host ("NSIS installation contents: " + ($discovered -join '; '))
56
$uninstallRoots = @(
57
'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall',
58
'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall',
@@ -80,7 +80,7 @@ function Install-NSIS([string]$installer,[string]$directory) {
80
}
81
function Run-Native([string]$exe,[string]$profile,[string]$mode,[string]$version) {
82
$report = Join-Path $reportDir ($mode + '-native-result.json')
83
- & node 'tests/windows-vm-installed-tauri-cdp.cjs' $exe $profile $mode $version $report
83
+ & node 'tests/windows-vm-installed-tauri-cdp.cjs' $exe $profile $mode $version $report | Out-Host
84
if ($LASTEXITCODE -ne 0) { throw "Installed native application $mode test failed (exit $LASTEXITCODE)" }
85
$result = Get-Content $report -Raw | ConvertFrom-Json
86
if ($result.status -ne 'PASSED' -or $result.installedNativeTauri -ne $true) {