Skip to content

FIX: keep package-source in git so a clone can composer install - #52

Open
allrude wants to merge 1 commit into
GrimLink:mainfrom
Siteation:fix/keep-package-source-in-git
Open

FIX: keep package-source in git so a clone can composer install#52
allrude wants to merge 1 commit into
GrimLink:mainfrom
Siteation:fix/keep-package-source-in-git

Conversation

@allrude

@allrude allrude commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

A project created by mage cannot be cloned and set up again, because package-source disappears.

mage install registers package-source/*/* as a Composer path repository and creates the folder, but git cannot track an empty directory. After a clone the folder is gone and composer install aborts before installing anything:

In PathRepository.php line 163:
  The `url` supplied for the path (package-source/*/*) repository does not exist

This adds a .gitkeep marker next to the mkdir -p, so the folder survives a clone.

Found while setting up a store from a fresh clone on a second machine. Only src/ is touched, the built mage is left for a release as usual.

One thing worth flagging for #47: its .gitignore lists /package-source/, which would ignore this marker and bring the problem back. Ignoring /package-source/* with a !/package-source/.gitkeep negation keeps the packages untracked while letting the folder survive.

git cannot track an empty directory, so a project created by mage loses
its package-source folder on clone and composer install aborts with
"the url supplied for the path (package-source/*/*) repository does not
exist". A .gitkeep marker keeps the folder present.

Co-Authored-By: Claude Opus 5 (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