From 2c21fecead35daf22107cc8f47c7ec510aced200 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 20 Dec 2013 17:40:20 -0200 Subject: Fix bug when docs are missing --- src/luarocks/doc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/doc.lua b/src/luarocks/doc.lua index c2989f98..a3badd54 100644 --- a/src/luarocks/doc.lua +++ b/src/luarocks/doc.lua @@ -64,9 +64,8 @@ function run(...) break end end - docdir = dir.normalize(docdir):gsub("/+", "/") if not docdir then - if descript.homepage then + if descript.homepage and not flags["list"] then util.printout("Local documentation directory not found -- opening "..descript.homepage.." ...") fs.browser(descript.homepage) return true @@ -74,6 +73,7 @@ function run(...) return nil, "Documentation directory not found for "..name.." "..version end + docdir = dir.normalize(docdir):gsub("/+", "/") local files = fs.find(docdir) local htmlpatt = "%.html?$" local extensions = { htmlpatt, "%.md$", "%.txt$", "%.textile$", "" } -- cgit v1.2.3-55-g6feb