sindresorhus / cpy

Copy files
MIT License
425 stars 63 forks source link

Strange behavior on latest `recursive` mode #91

Closed JounQin closed 2 years ago

JounQin commented 3 years ago

I installed latest cpy with yarn add cpy@sindresorhus/cpy.

// copy.js

// @ts-check

import cpy from 'cpy'

const args = process.argv.slice(2)

cpy(args, args.pop())
node copy 'node_modules/shiki/{dist/*.wasm,languages,themes}/**' public/shiki

image

node copy 'node_modules/shiki/{dist/*.wasm,languages,themes}/**' public/shiki/_ # note the `/_` here

image

I also tried the following one and it failed.

node copy 'node_modules/shiki/{dist/*.wasm,languages/**,themes/**}' public/shiki

But the following one also worked

node copy 'node_modules/shiki/{dist/*.wasm,languages/**,themes/**}' public/shiki/_
JounQin commented 3 years ago

cc @Idered

Idered commented 3 years ago

@JounQin I found the issue and I'm working on solution