# Map SMB share for harmonize image step (optional wrapper). param( [switch]$SkipConfirm ) $ErrorActionPreference = "Stop" . (Join-Path $PSScriptRoot "lib\Deploy-CliResult.ps1") $smbRoot = "\\192.168.10.122\Gallery" if ($env:SMB_USER -and $env:SMB_PASSWORD) { Write-Host "Mapping $smbRoot ..." net use $smbRoot /user:$env:SMB_USER $env:SMB_PASSWORD 2>&1 | Out-Host } elseif (-not (Test-Path $smbRoot)) { Write-Warning "Cannot access $smbRoot (not authenticated)." Write-Warning "Map the share first or set `$env:SMB_USER and `$env:SMB_PASSWORD." } $npmArgs = @('run', 'harmonize:images') if ($args.Count -gt 0) { $npmArgs += '--' $npmArgs += $args } $RepoRoot = (Resolve-Path (Join-Path $PSScriptRoot "..\..")).Path Set-Location $RepoRoot & npm @npmArgs exit $LASTEXITCODE