Skip to content

Commit 4e9e689

Browse files
Update verify-package.ps1
1 parent a0039b0 commit 4e9e689

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎build/verify-package.ps1‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ if (Test-Path -LiteralPath $asar -PathType Leaf) {
8282
$asarCli = Join-Path $rootDir 'node_modules\.bin\asar.cmd'
8383
if (Test-Path -LiteralPath $asarCli -PathType Leaf) {
8484
try {
85-
$listing = & $asarCli list $asar 2>$null
85+
# @electron/asar's `list` builds paths with Node's path.join, which
86+
# emits OS-native separators — backslashes on Windows (the CI runner).
87+
# Normalise both sides to forward slashes so the comparison works
88+
# regardless of platform; otherwise '\electron\main.js' never matches
89+
# the '/electron/main.js' literal and present files look "missing".
90+
$listing = & $asarCli list $asar 2>$null |
91+
ForEach-Object { ($_ -replace '\\', '/').Trim() }
8692
foreach ($entry in @('/electron/main.js', '/electron/preload.js', '/electron/splash.html')) {
8793
if ($listing -contains $entry) {
8894
Write-Host " [OK] asar:$entry" -ForegroundColor Green

0 commit comments

Comments
 (0)