sindresorhus / cpy-cli

Copy files
MIT License
345 stars 33 forks source link

macOS problemam with subfolders #46

Open gianlucanigro opened 1 year ago

gianlucanigro commented 1 year ago

Platform

macOS monterey M1 Max processor Node 18.17.0 npm 9.6.7

If I define a script in package.json with

cpy 'prisma/parts/schema.prisma' 'prisma/'

and I run nom run script from the project root folder a prisma folder is created under the prisma folder in the project root

instead of copying schema.prisma from prisma/parts in prisma

Tested both 4.2.0 and 5.0.0, with version 3.1.1 the behaviour is correct

gian1200 commented 1 year ago

This is not a macOS only issue. It also happens on Windows. This issue seems to be happening when copying single files only. It doesn't happen when using blobs.

In your example, this is a workaround I've found:

cpy 'prisma/parts/*schema.prisma' 'prisma/'