diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-04-18 14:47:32 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-04-18 14:47:32 -0300 |
commit | 800c2fe268481d6dc60f95005032a72d8cbe82db (patch) | |
tree | bd7f6df6dd172eea24d56af1839eeb704a269d95 | |
parent | 66ed25b059e62806c9f1909e3af8ddc2df17614f (diff) | |
download | luarocks-800c2fe268481d6dc60f95005032a72d8cbe82db.tar.gz luarocks-800c2fe268481d6dc60f95005032a72d8cbe82db.tar.bz2 luarocks-800c2fe268481d6dc60f95005032a72d8cbe82db.zip |
Fix uses of home_config_file when it goes missing due to --force-config.
-rw-r--r-- | src/luarocks/cfg.lua | 2 | ||||
-rw-r--r-- | src/luarocks/help.lua | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/luarocks/cfg.lua b/src/luarocks/cfg.lua index 2f2c7a66..90bed195 100644 --- a/src/luarocks/cfg.lua +++ b/src/luarocks/cfg.lua | |||
@@ -264,7 +264,7 @@ local defaults = { | |||
264 | } | 264 | } |
265 | 265 | ||
266 | if detected.windows then | 266 | if detected.windows then |
267 | home_config_file = home_config_file:gsub("\\","/") | 267 | home_config_file = home_config_file and home_config_file:gsub("\\","/") |
268 | defaults.fs_use_modules = false | 268 | defaults.fs_use_modules = false |
269 | defaults.arch = "win32-"..proc | 269 | defaults.arch = "win32-"..proc |
270 | defaults.platforms = {"win32", "windows" } | 270 | defaults.platforms = {"win32", "windows" } |
diff --git a/src/luarocks/help.lua b/src/luarocks/help.lua index 45fc3bb4..2944dfd8 100644 --- a/src/luarocks/help.lua +++ b/src/luarocks/help.lua | |||
@@ -80,9 +80,12 @@ function run(...) | |||
80 | util.printout("\t", command.help_summary) | 80 | util.printout("\t", command.help_summary) |
81 | end | 81 | end |
82 | print_section("CONFIGURATION") | 82 | print_section("CONFIGURATION") |
83 | util.printout([[ | 83 | util.printout("\tSystem configuration file: ".. sys_file .. " (" .. get_status(sys_ok) ..")") |
84 | System configuration file: ]]..sys_file .. " (" .. get_status(sys_ok) ..[[) | 84 | if home_file then |
85 | User configuration file: ]]..home_file .. " (" .. get_status(home_ok) ..")\n") | 85 | util.printout("\tUser configuration file: ".. home_file .. " (" .. get_status(home_ok) ..")\n") |
86 | else | ||
87 | util.printout("\tUser configuration file disabled in this LuaRocks installation.\n") | ||
88 | end | ||
86 | else | 89 | else |
87 | command = command:gsub("-", "_") | 90 | command = command:gsub("-", "_") |
88 | if commands[command] then | 91 | if commands[command] then |