Skip to content

Commit

Permalink
Fix init command
Browse files Browse the repository at this point in the history
  • Loading branch information
Arian Weber authored and Arian Weber committed Feb 11, 2024
1 parent ebdfbca commit 7b2023d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/pg-tools/cli/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,12 @@ def init()
files.each { |f|
target_file = File.join(target, f.sub(template_dir, ""))
target_file = target_file.gsub(".resource", "")
FileUtils.mkdir_p(File.dirname(target))
FileUtils.cp(f, target) unless File.basename(f) == ".keep"
FileUtils.mkdir_p(File.dirname(target_file))
FileUtils.cp(f, target_file) unless File.basename(f) == ".keep"
}
# Copy the actual default config into the project as that
# will contain all keys and should be commented
FileUtils.cp(File.join(PgTools.root, "data", "config", "pg-tools.yml"), File.join("template_dir", ".pg-tools.yml"))
FileUtils.cp(File.join(PgTools.root, "data", "config", "pg-tools.yml"), File.join(target, ".pg-tools.yml"))

# Initialize git project
Dir.chdir(target) {
Expand Down

0 comments on commit 7b2023d

Please sign in to comment.