Thor gem copying an empty directory isn't working

50 Views Asked by At

from the doc: https://rdoc.info/github/erikhuda/thor/master/Thor%2FActions:directory

#directory(source, *args, &block)

... If any empty directory is found, it's copied and all .empty_directory files are ignored

Here is my structure:

enter image description here

I'm using this in a gem and here is the part where I copy the directory:

def add_webpack_native_folder
  directory 'webpack_native', 'app/webpack_native'
end

The folder webpack_native has basically a src folder that contains the following folders: javascripts, stylesheets and images. The javascript and stylesheets get copied without issue (because they have a file on each of them) but the folder images don't get copied (even though it contains a .empty_directory as the doc suggested)

The full code source can be found in https://github.com/scratchoo/webpack_native

If you need more context, just ask

0

There are 0 best solutions below