diff options
Diffstat (limited to 'src/luarocks/command_line.lua')
| -rw-r--r-- | src/luarocks/command_line.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/luarocks/command_line.lua b/src/luarocks/command_line.lua index a92a3f9d..96d7cb11 100644 --- a/src/luarocks/command_line.lua +++ b/src/luarocks/command_line.lua | |||
| @@ -10,6 +10,7 @@ local cfg = require("luarocks.cfg") | |||
| 10 | local path = require("luarocks.path") | 10 | local path = require("luarocks.path") |
| 11 | local dir = require("luarocks.dir") | 11 | local dir = require("luarocks.dir") |
| 12 | local deps = require("luarocks.deps") | 12 | local deps = require("luarocks.deps") |
| 13 | local fs = require("luarocks.fs") | ||
| 13 | 14 | ||
| 14 | local program = util.this_program("luarocks") | 15 | local program = util.this_program("luarocks") |
| 15 | 16 | ||
| @@ -79,7 +80,6 @@ function command_line.run_command(...) | |||
| 79 | 80 | ||
| 80 | if flags["verbose"] then -- setting it in the config file will kick-in earlier in the process | 81 | if flags["verbose"] then -- setting it in the config file will kick-in earlier in the process |
| 81 | cfg.verbose = true | 82 | cfg.verbose = true |
| 82 | local fs = require("luarocks.fs") | ||
| 83 | fs.verbose() | 83 | fs.verbose() |
| 84 | end | 84 | end |
| 85 | 85 | ||
| @@ -202,6 +202,10 @@ function command_line.run_command(...) | |||
| 202 | end | 202 | end |
| 203 | end | 203 | end |
| 204 | 204 | ||
| 205 | if not fs.exists(".") then | ||
| 206 | die("Current directory does not exist. Please run LuaRocks from an existing directory.") | ||
| 207 | end | ||
| 208 | |||
| 205 | if commands[command] then | 209 | if commands[command] then |
| 206 | -- TODO the interface of run should be modified, to receive the | 210 | -- TODO the interface of run should be modified, to receive the |
| 207 | -- flags table and the (possibly unpacked) nonflags arguments. | 211 | -- flags table and the (possibly unpacked) nonflags arguments. |
