diff options
author | Thijs Schreijer <thijs@thijsschreijer.nl> | 2013-12-23 23:37:36 +0100 |
---|---|---|
committer | Thijs Schreijer <thijs@thijsschreijer.nl> | 2013-12-23 23:37:36 +0100 |
commit | b2204739c6edcd77a08cfaa48d5ade4e115332a1 (patch) | |
tree | 979ce27f4a17e7d5f08f0ecf97babd99f0dbdb66 | |
parent | 3bc775bb10f9cec6c4c66b1221ece63077ea6ea7 (diff) | |
download | luarocks-b2204739c6edcd77a08cfaa48d5ade4e115332a1.tar.gz luarocks-b2204739c6edcd77a08cfaa48d5ade4e115332a1.tar.bz2 luarocks-b2204739c6edcd77a08cfaa48d5ade4e115332a1.zip |
normalize paths in help output
-rw-r--r-- | src/luarocks/help.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/luarocks/help.lua b/src/luarocks/help.lua index 33c684ad..2774dc41 100644 --- a/src/luarocks/help.lua +++ b/src/luarocks/help.lua | |||
@@ -8,6 +8,7 @@ module("luarocks.help", package.seeall) | |||
8 | 8 | ||
9 | local util = require("luarocks.util") | 9 | local util = require("luarocks.util") |
10 | local cfg = require("luarocks.cfg") | 10 | local cfg = require("luarocks.cfg") |
11 | local dir = require("luarocks.dir") | ||
11 | 12 | ||
12 | local program = util.this_program("luarocks") | 13 | local program = util.this_program("luarocks") |
13 | 14 | ||
@@ -81,19 +82,20 @@ function run(...) | |||
81 | end | 82 | end |
82 | print_section("CONFIGURATION") | 83 | print_section("CONFIGURATION") |
83 | util.printout("\tLua version: " .. cfg.lua_version) | 84 | util.printout("\tLua version: " .. cfg.lua_version) |
84 | util.printout("\tSystem configuration file: ".. sys_file .. " (" .. get_status(sys_ok) ..")") | 85 | util.printout("\tConfiguration files:") |
86 | util.printout("\t\tSystem: ".. dir.normalize(sys_file) .. " (" .. get_status(sys_ok) ..")") | ||
85 | if home_file then | 87 | if home_file then |
86 | util.printout("\tUser configuration file: ".. home_file .. " (" .. get_status(home_ok) ..")\n") | 88 | util.printout("\t\tUser : ".. dir.normalize(home_file) .. " (" .. get_status(home_ok) ..")\n") |
87 | else | 89 | else |
88 | util.printout("\tUser configuration file disabled in this LuaRocks installation.\n") | 90 | util.printout("\t\tUser : disabled in this LuaRocks installation.\n") |
89 | end | 91 | end |
90 | util.printout("\tRocks trees in use: ") | 92 | util.printout("\tRocks trees in use: ") |
91 | for _, tree in ipairs(cfg.rocks_trees) do | 93 | for _, tree in ipairs(cfg.rocks_trees) do |
92 | if type(tree) == "string" then | 94 | if type(tree) == "string" then |
93 | util.printout("\t\t"..tree) | 95 | util.printout("\t\t"..dir.normalize(tree)) |
94 | else | 96 | else |
95 | local name = tree.name and " (\""..tree.name.."\")" or "" | 97 | local name = tree.name and " (\""..tree.name.."\")" or "" |
96 | util.printout("\t\t"..tree.root..name) | 98 | util.printout("\t\t"..dir.normalize(tree.root)..name) |
97 | end | 99 | end |
98 | end | 100 | end |
99 | else | 101 | else |