Skip to content

CI: fix Windows installer payload Copy-Item failure#4

Open
Mubeenpothigara13 wants to merge 2 commits into
mainfrom
fix/installer-payload-dirs
Open

CI: fix Windows installer payload Copy-Item failure#4
Mubeenpothigara13 wants to merge 2 commits into
mainfrom
fix/installer-payload-dirs

Conversation

@Mubeenpothigara13
Copy link
Copy Markdown
Collaborator

Summary

  • Last 5 Windows Installer builds failed with Container cannot be copied onto existing leaf item. at the Copy-Item "python-embed\*" -Destination "$payload\python" step.
  • Root cause: PowerShell's Copy-Item -Recurse to a non-existent destination creates the dest as a leaf (file) when the source's first child is a file, then refuses every subsequent copy into it.
  • Fix: explicitly New-Item -ItemType Directory for all payload subdirs (app, python, pgsql, scripts, tools) before any copies, so each Copy-Item always lands inside a real container.

Test plan

  • PR triggers Windows Installer workflow; the "Assemble installer payload" step succeeds.
  • Inno Setup compile step produces SPBilling-Setup-*.exe artifact.
  • Artifact downloads cleanly from the run summary.

Refs failing run: https://github.com/sabugar/spbillling/actions/runs/25604490740

Mubeenpothigara13 and others added 2 commits May 10, 2026 16:07
The Windows Installer workflow was failing on every push since April with:
"Container cannot be copied onto existing leaf item." at the
'Copy-Item "python-embed\*" -Destination "$payload\python"' step.
PowerShell's Copy-Item creates the destination as a leaf when the source's
first item is a file, then refuses subsequent directory copies into it.

Fix: explicitly New-Item all payload subdirs (app, python, pgsql, scripts,
tools) up-front so Copy-Item always lands inside an existing container.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
robocopy returns 0-7 on success (1 = files copied) but pwsh treats any
non-zero $LASTEXITCODE at script end as a step failure. Reset it after
the >=8 validation so the Assemble step exits clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant