aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/command_line.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/command_line.lua')
-rw-r--r--src/luarocks/command_line.lua6
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")
10local path = require("luarocks.path") 10local path = require("luarocks.path")
11local dir = require("luarocks.dir") 11local dir = require("luarocks.dir")
12local deps = require("luarocks.deps") 12local deps = require("luarocks.deps")
13local fs = require("luarocks.fs")
13 14
14local program = util.this_program("luarocks") 15local 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.