Skip to content

Fix glob sources, add tests for fixed recursive bugs#119

Merged
sindresorhus merged 5 commits intosindresorhus:mainfrom
sigJoe:fix-issues
Aug 12, 2025
Merged

Fix glob sources, add tests for fixed recursive bugs#119
sindresorhus merged 5 commits intosindresorhus:mainfrom
sigJoe:fix-issues

Conversation

@sigJoe
Copy link
Contributor

@sigJoe sigJoe commented Jul 29, 2025

I added a fix for this issue:
sindresorhus/cpy-cli#35

To reproduce:

mkdir test
cd test
npm i cpy-cli@latest 
mkdir src dest
touch src/foo
npx cpy '*' '../dest' --cwd src
find . -path "*/node_modules" -prune -o -print


Output BEFORE:
.
./test
./test/src
./test/src/foo <- notice it created a 'test' subfolder and moved things under that
./package-lock.json 
./package.json
./dest <- empty dest :(
./src
./src/foo

Output AFTER:
.
./package-lock.json
./package.json
./dest
./dest/foo <- exactly where I want it
./src
./src/foo

Then I saw #99 and figured I might as well add tests for that as well.


Fixes #35
Fixes #99

@sigJoe
Copy link
Contributor Author

sigJoe commented Jul 29, 2025

Also went to fix #117 because it looked trivial but it broke the Windows tests and I'm not in a position to test that.

@sindresorhus sindresorhus merged commit 8ae6add into sindresorhus:main Aug 12, 2025
6 checks passed
@sindresorhus
Copy link
Owner

Thanks :)

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.

Add tests for fixed recursive bugs [NO NEW FEATURES WILL BE ADDED UNTIL THIS IS DONE]

2 participants