diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/build.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/luarocks/build.lua b/src/luarocks/build.lua index 49bcefab..5555d94a 100644 --- a/src/luarocks/build.lua +++ b/src/luarocks/build.lua | |||
@@ -243,7 +243,12 @@ function build_rockspec(rockspec_file, need_to_fetch, minimal_mode, deps_mode) | |||
243 | end | 243 | end |
244 | end | 244 | end |
245 | 245 | ||
246 | local copy_directories = build.copy_directories or {"doc"} | 246 | local copy_directories = build.copy_directories |
247 | local copying_default = false | ||
248 | if not copy_directories then | ||
249 | copy_directories = {"doc"} | ||
250 | copying_default = true | ||
251 | end | ||
247 | 252 | ||
248 | for _, copy_dir in pairs(copy_directories) do | 253 | for _, copy_dir in pairs(copy_directories) do |
249 | if fs.is_dir(copy_dir) then | 254 | if fs.is_dir(copy_dir) then |
@@ -251,7 +256,9 @@ function build_rockspec(rockspec_file, need_to_fetch, minimal_mode, deps_mode) | |||
251 | fs.make_dir(dest) | 256 | fs.make_dir(dest) |
252 | fs.copy_contents(copy_dir, dest) | 257 | fs.copy_contents(copy_dir, dest) |
253 | else | 258 | else |
254 | util.warning("Directory '"..copy_dir.."' not found") | 259 | if not copying_default then |
260 | return nil, "Directory '"..copy_dir.."' not found" | ||
261 | end | ||
255 | end | 262 | end |
256 | end | 263 | end |
257 | 264 | ||