diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2013-12-20 17:40:20 -0200 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2014-01-10 16:41:38 -0200 |
| commit | 2c21fecead35daf22107cc8f47c7ec510aced200 (patch) | |
| tree | c928e1566d0a52a2e928dde0f3e6c00c9428704c | |
| parent | bac6b52d0498ec1c8ae5f81847c0332324566c03 (diff) | |
| download | luarocks-2c21fecead35daf22107cc8f47c7ec510aced200.tar.gz luarocks-2c21fecead35daf22107cc8f47c7ec510aced200.tar.bz2 luarocks-2c21fecead35daf22107cc8f47c7ec510aced200.zip | |
Fix bug when docs are missing
| -rw-r--r-- | src/luarocks/doc.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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(...) | |||
| 64 | break | 64 | break |
| 65 | end | 65 | end |
| 66 | end | 66 | end |
| 67 | docdir = dir.normalize(docdir):gsub("/+", "/") | ||
| 68 | if not docdir then | 67 | if not docdir then |
| 69 | if descript.homepage then | 68 | if descript.homepage and not flags["list"] then |
| 70 | util.printout("Local documentation directory not found -- opening "..descript.homepage.." ...") | 69 | util.printout("Local documentation directory not found -- opening "..descript.homepage.." ...") |
| 71 | fs.browser(descript.homepage) | 70 | fs.browser(descript.homepage) |
| 72 | return true | 71 | return true |
| @@ -74,6 +73,7 @@ function run(...) | |||
| 74 | return nil, "Documentation directory not found for "..name.." "..version | 73 | return nil, "Documentation directory not found for "..name.." "..version |
| 75 | end | 74 | end |
| 76 | 75 | ||
| 76 | docdir = dir.normalize(docdir):gsub("/+", "/") | ||
| 77 | local files = fs.find(docdir) | 77 | local files = fs.find(docdir) |
| 78 | local htmlpatt = "%.html?$" | 78 | local htmlpatt = "%.html?$" |
| 79 | local extensions = { htmlpatt, "%.md$", "%.txt$", "%.textile$", "" } | 79 | local extensions = { htmlpatt, "%.md$", "%.txt$", "%.textile$", "" } |
