aboutsummaryrefslogtreecommitdiff
path: root/src/luarocks/path.lua
diff options
context:
space:
mode:
Diffstat (limited to 'src/luarocks/path.lua')
-rw-r--r--src/luarocks/path.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua
index 3ff0db8a..83b84530 100644
--- a/src/luarocks/path.lua
+++ b/src/luarocks/path.lua
@@ -6,6 +6,7 @@ module("luarocks.path", package.seeall)
6 6
7local dir = require("luarocks.dir") 7local dir = require("luarocks.dir")
8local cfg = require("luarocks.cfg") 8local cfg = require("luarocks.cfg")
9local util = require("luarocks.util")
9 10
10help_summary = "Return the currently configured package path." 11help_summary = "Return the currently configured package path."
11help_arguments = "" 12help_arguments = ""
@@ -301,14 +302,15 @@ function versioned_name(file, prefix, name, version)
301end 302end
302 303
303--- Driver function for "path" command. 304--- Driver function for "path" command.
305-- This platform distinction is not in fs to avoid depending on that module here.
304-- @return boolean This function always succeeds. 306-- @return boolean This function always succeeds.
305function run(...) 307function run(...)
306 if cfg.is_platform("unix") then 308 if cfg.is_platform("unix") then
307 print("export LUA_PATH='"..package.path.."'") 309 util.printout("export LUA_PATH='"..package.path.."'")
308 print("export LUA_CPATH='"..package.cpath.."'") 310 util.printout("export LUA_CPATH='"..package.cpath.."'")
309 elseif cfg.is_platform("windows") then 311 elseif cfg.is_platform("windows") then
310 print("SET LUA_PATH="..package.path) 312 util.printout("SET LUA_PATH="..package.path)
311 print("SET LUA_CPATH="..package.cpath) 313 util.printout("SET LUA_CPATH="..package.cpath)
312 end 314 end
313 return true 315 return true
314end 316end