CI: fix Windows installer payload Copy-Item failure#4
Open
Mubeenpothigara13 wants to merge 2 commits into
Open
CI: fix Windows installer payload Copy-Item failure#4Mubeenpothigara13 wants to merge 2 commits into
Mubeenpothigara13 wants to merge 2 commits into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Container cannot be copied onto existing leaf item.at theCopy-Item "python-embed\*" -Destination "$payload\python"step.Copy-Item -Recurseto 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.New-Item -ItemType Directoryfor all payload subdirs (app,python,pgsql,scripts,tools) before any copies, so eachCopy-Itemalways lands inside a real container.Test plan
SPBilling-Setup-*.exeartifact.Refs failing run: https://github.com/sabugar/spbillling/actions/runs/25604490740