Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 4619

Files with a dot at the beginning are not copied

$
0
0

I use Thor to copy the contents of one folder to another, here is my code:

module Generators  module App    class New < Thor::Group      include Thor::Actions      desc "Generate a new customer gem structure"      argument :name      argument :pascal_case_name      def self.source_root        File.expand_path("../../templates", __dir__)      end      def create        directory("app", name.to_s)      end

The problem is that files that start with a dot, for example .gitignore or .env, are not copied. I had to remove the dot at the beginning of such files, but this does not suit me.

I tried to use the debugger for the directory method, but I didn't see anything suspicious there.


Viewing all articles
Browse latest Browse all 4619

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>