Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

Diagnose private V6 electron-builder NSIS failure via bounded public-safe categories

davoodmehraban89 committed Oct 18, 2026 at 06:15 UTC 9caa67a0a3cc5c0a5553eb8f27f1176efb1892a7
1 file changed +23 -2
.github/workflows/windows-v6-rebuilt-installed-gui-lab-once.yml
+23 -2
@@ -81,8 +81,29 @@ jobs:
81 $ErrorActionPreference='Continue'
82 $PSNativeCommandUseErrorActionPreference=$false
83 Set-Location -LiteralPath $env:TF_PRIVATE_STAGE
84 - & npx --no-install electron-builder --win nsis --x64 --publish never *> (Join-Path $env:RUNNER_TEMP 'private-installer-build.log')
85 - if($LASTEXITCODE -ne 0){throw 'PRIVATE_V6_NSIS_BUILD_FAILED'}
84 + $log=Join-Path $env:RUNNER_TEMP 'private-installer-build.log'
85 + & npx --no-install electron-builder --win nsis --x64 --publish never *> $log
86 + $builderExit=$LASTEXITCODE
87 + $txt=if(Test-Path -LiteralPath $log){Get-Content -LiteralPath $log -Raw}else{''}
88 + $classes=[ordered]@{
89 + SIGNING='code.sign|signature|signing|certificate|CSC_'
90 + NSIS_TOOL='makensis|nsis|appBuilder'
91 + DOWNLOAD='download|fetch|network|ECONNRESET|ETIMEDOUT|ENOTFOUND'
92 + FILE_MISSING='ENOENT|no.such.file|not.found|file.does.not.exist|missing'
93 + MODULE_MISSING='cannot.find.module|module.not.found|require.stack'
94 + FILE_LOCK='EPERM|EACCES|access.is.denied'
95 + CONFIG='configuration|invalid.config|schema|unsupported.target'
96 + ASAR='asar|cannot.pack|archive'
97 + PATH='path.too.long|filename.too.long'
98 + DEPENDENCIES='dependencies|node_modules|npmRebuild|rebuild'
99 + ELECTRON='electron|win-unpacked'
100 + GENERIC_ERROR='Error:|⨯|error'
101 + }
102 + foreach($k in $classes.Keys){Write-Host ("BUILDER_LOG_HAS_"+$k+"="+[bool]($txt -match $classes[$k]))}
103 + $setupBefore=@(Get-ChildItem (Join-Path $env:TF_PRIVATE_STAGE 'release') -Recurse -File -Filter 'TreasuryFlow-Setup-*-Windows-x64.exe' -ErrorAction SilentlyContinue)
104 + Write-Host ("BUILDER_SETUP_FILE_COUNT="+$setupBefore.Count)
105 + Write-Host ("BUILDER_PROCESS_EXIT_NONZERO="+[bool]($builderExit -ne 0))
106 + if($builderExit -ne 0){throw 'PRIVATE_V6_NSIS_BUILD_FAILED_SANITIZED_DIAGNOSTIC_ABOVE'}
107 $setup=@(Get-ChildItem (Join-Path $env:TF_PRIVATE_STAGE 'release') -Recurse -File -Filter 'TreasuryFlow-Setup-*-Windows-x64.exe' -ErrorAction SilentlyContinue)
108 if($setup.Count -ne 1 -or $setup[0].Length -lt 1000000){throw 'PRIVATE_SETUP_OUTPUT_NOT_UNIQUE'}
109 "TF_EPHEMERAL_NSIS_SETUP=$($setup[0].FullName)" >> $env:GITHUB_ENV