Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Copying into a folder doesn't work without specifying a filename in destination #62

Closed
kayvanbree opened this issue Mar 28, 2019 · 2 comments

Comments

@kayvanbree
Copy link

kayvanbree commented Mar 28, 2019

On Windows, the following command works:

cp-cli README.md dist/my-lib/README.md

But the following commands don't work:

cp-cli README.md dist/my-lib/
cp-cli README.md dist/my-lib

According the docs the first one (with the slash) should work, but instead it gives the following error:

{ [Error: EPERM: operation not permitted, unlink 'C:\Projects\my-project\dist\my-lib']
  errno: -4048,
  code: 'EPERM',
  syscall: 'unlink',
  path:
   'C:\\Projects\\my-project\\dist\\my-lib' }

I solved this by adding the filename, but wanted to let you know. I don't know if this is also a problem on Unix systems.

Great work on this library by the way! cpx didn't want to copy a folder with assets and it hadn't been released for 3 years, so it's nice to see a fresh new copy library.

@screendriver
Copy link
Owner

screendriver commented Mar 29, 2019

I created a test environment for Windows here 3ee0afa and try to reproduce and fix it ☺️
Thank you for the report and feedback 👍

@screendriver
Copy link
Owner

After looking around I found out that in the last couple of years a lot of new, and better, alternatives to cp-cli were created. So in favour of cpy-cli, ncp and cpx I will archive this repository.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants