sindresorhus/cpy-cli

macOS problemam with subfolders

Opened this issue · 1 comments

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

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/'