Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copying files starting with . not working even after -a and all the suggested options #106

Open
thirumalaicb opened this issue Sep 8, 2021 · 3 comments

Comments

@thirumalaicb
Copy link

Hi,

I have a file starting with a dot (.) in the root and I am trying to copy it to the output folder dist. I have gone through all the closed issues #18, #22, #24, #36, and #52.

Note:

  • I am executing this from the package.json script.
  • This executes in a docker container.
  • My dot file is in the root directory.
  • I am also combining other static files to be copied, for example, .json.

I have also tried the below.

copyfiles -a -u 1 src/**/*.json dist => does not copy the dot file, but the JSON file is copied.
copyfiles -a -u 1 ./ src/**/*.json dist => does not copy the dot file, but the JSON file is copied.
copyfiles -a -u 1 .env src/**/*.json dist => Error: cant go up that far
copyfiles -a -u 1 ./* src/**/*.json dist => Error: cant go up that far
copyfiles -a -u 1 \"./*\" src/**/*.json dist => Error: cant go up that far
copyfiles -a -u 1 \"./**/*\" src/**/*.json dist => Error: cant go up that far
copyfiles -a -u 1 \"./**/*\" \"src/**/*.json\" dist => Error: cant go up that far
copyfiles -a -u 1 \"**/*\" \"src/**/*.json\" dist => Error: cant go up that far
copyfiles -a -u 1 \"./*.file\" \"src/**/*.json\" dist => Error: cant go up that far

I am not sure what I am missing.

@terenceodonoghue
Copy link

@thirumalaicb I came here with the same problem. I was eventually able to resolve this by enclosing the path in escaped double quotes.

# Ignores dotfiles
copyfiles -a -u 1 src/generators/**/templates/* dist/

# Copies with dotfiles
copyfiles -a -u 1 \"src/generators/**/templates/*\" dist/

@nclsndr
Copy link

nclsndr commented May 18, 2022

Same issue with glob pattern copyfiles --all ./src/templates/**/* ./dist
I have dotfiles in directory like templates/child/.dotfile.js.

@michaelfaith
Copy link

Having the same issue.

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

No branches or pull requests

4 participants