summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-02-28 23:55:18 +0200
committerPaul Buetow <paul@buetow.org>2025-02-28 23:55:18 +0200
commitb81d86ef9a6e286efdaf7f574a105ab416928551 (patch)
treebd665c4a9c7d27f546e66e525b70033a24fc3513
parent3e61682894046558da077d222ad328e902c6274c (diff)
fix
-rw-r--r--lib/dslkeywords/file.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/dslkeywords/file.rb b/lib/dslkeywords/file.rb
index 5230a3f..aa1b725 100644
--- a/lib/dslkeywords/file.rb
+++ b/lib/dslkeywords/file.rb
@@ -320,7 +320,11 @@ module RCM
end
do? "Copying #{source_path} -> #{@file_path} resursively" do
- Dir["#{source_path}/*"].each { FileUtils.cp_r(_1, @file_path) }
+ if File.directory?(@file_path)
+ Dir["#{source_path}/*"].each { FileUtils.cp_r(_1, @file_path) }
+ else
+ FileUtils.cp_r(source_path, @file_path)
+ end
end
end