calvinmetcalf / copyfiles

copy files on the command line
MIT License
411 stars 52 forks source link

not working with Windows 10 #89

Closed wunaidage closed 4 years ago

wunaidage commented 4 years ago

my command is copyfiles -f ~/checkout/config.js './dist/configurations/' I use yarn to run it so the real command is yarn copyfiles -f ~/checkout/config.js './dist/configurations/' it works on macos and linux it does not work with windows 10. I tried all double / single quote on both source and destination part

the powershell output:

PS D:\jenkins\workspace\some_project\e2e> yarn copyfiles -f -V "~/checkout/config.js" dist/
yarn run v1.21.1
$ D:\jenkins\workspace\some_project\e2e\node_modules\.bin\copyfiles -f -V ~/checkout/config.js dist/
Done in 1.17s.

I tried to change the source directory to random garbage name which even not exist but it does not show any error

wunaidage commented 4 years ago

I find that tilde sign is not supported by fs. Devs need to expand it manually. so it's a miracle for me that macos and linux works. but I believe in science more so I modified the code a little bit and published to npm to support the tilde sign for home directory https://www.npmjs.com/package/@wunaidage/copyfiles

should I PR it?

calvinmetcalf commented 4 years ago

sure open a pr

wunaidage commented 4 years ago

https://github.com/calvinmetcalf/copyfiles/pull/90 thank you PR created