rails / thor

Thor is a toolkit for building powerful command-line interfaces.
http://whatisthor.com/
MIT License
5.14k stars 553 forks source link

directory action does not copy dotfiles #862

Closed mslinn closed 1 year ago

mslinn commented 1 year ago

This statement:

directory('common/gem_scaffold', dest_dir, force: true, mode: :preserve)

... recursively copies all the following files and directories, except those with names that start with a period:

$ ls -alF templates/common/gem_scaffold/
total 20
-rw-r--r-- 1 mslinn mslinn 2045 Nov  5 09:54 %gem_name%.gemspec.tt
drwxr-xr-x 1 mslinn mslinn 4096 Nov  5 11:52 ./
drwxr-xr-x 1 mslinn mslinn 4096 Nov  5 11:52 ../
drwxr-xr-x 1 mslinn mslinn 4096 Jun  7 08:14 .bundle/
-rw-r--r-- 1 mslinn mslinn  411 Jul 10 10:10 .gitignore.tt
-rw-r--r-- 1 mslinn mslinn  128 Nov  5 09:53 .markdownlint.json
-rw-r--r-- 1 mslinn mslinn   69 Jun  8 11:10 .rspec
-rw-r--r-- 1 mslinn mslinn 1258 Jun 24 21:07 .rubocop.yml.tt
-rw-r--r-- 1 mslinn mslinn   75 Nov  5 06:53 .shellcheckrc
drwxr-xr-x 1 mslinn mslinn 4096 Jul  8 10:37 .vscode/
-rw-r--r-- 1 mslinn mslinn   43 Nov  5 09:51 CHANGELOG.md.tt
-rw-r--r-- 1 mslinn mslinn 1354 Nov  5 06:55 Gemfile.tt
-rw-r--r-- 1 mslinn mslinn 1405 Jul 29 14:01 README.md.tt
-rw-r--r-- 1 mslinn mslinn 1300 Jun 24 20:57 Rakefile.tt
drwxr-xr-x 1 mslinn mslinn 4096 Nov  5 07:01 bin/
drwxr-xr-x 1 mslinn mslinn 4096 Jun  7 08:14 lib/
drwxr-xr-x 1 mslinn mslinn 4096 Jul 10 10:10 test/

Suggestions for a workaround?

mslinn commented 1 year ago

I was wrong, this does not happen