diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2013-11-14 22:21:18 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2013-11-14 22:21:18 -0200 |
commit | de9c9823b9a3e5a0c712bcf23f30d800c18825a4 (patch) | |
tree | c7ea7c5b7610ed5b56fe116be3578b47f4327465 | |
parent | 3168eaa1d1e3336df81c184b6869a1553e3b8b8e (diff) | |
download | luarocks-de9c9823b9a3e5a0c712bcf23f30d800c18825a4.tar.gz luarocks-de9c9823b9a3e5a0c712bcf23f30d800c18825a4.tar.bz2 luarocks-de9c9823b9a3e5a0c712bcf23f30d800c18825a4.zip |
Fix `luarocks path` now that luarocks.cfg no longer edits package.path
Diffstat (limited to '')
-rw-r--r-- | src/luarocks/path.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/luarocks/path.lua b/src/luarocks/path.lua index f8ae15c0..d7273095 100644 --- a/src/luarocks/path.lua +++ b/src/luarocks/path.lua | |||
@@ -410,9 +410,17 @@ function run(...) | |||
410 | util.printout(util.remove_path_dupes(lr_bin, ';')) | 410 | util.printout(util.remove_path_dupes(lr_bin, ';')) |
411 | return true | 411 | return true |
412 | end | 412 | end |
413 | |||
414 | if flags["append"] then | ||
415 | lr_path = package.path .. ";" .. lr_path | ||
416 | lr_cpath = package.cpath .. ";" .. lr_cpath | ||
417 | else | ||
418 | lr_path = lr_path.. ";" .. package.path | ||
419 | lr_cpath = lr_cpath .. ";" .. package.cpath | ||
420 | end | ||
413 | 421 | ||
414 | util.printout(cfg.export_lua_path:format(util.remove_path_dupes(package.path, ';'))) | 422 | util.printout(cfg.export_lua_path:format(util.remove_path_dupes(lr_path, ';'))) |
415 | util.printout(cfg.export_lua_cpath:format(util.remove_path_dupes(package.cpath, ';'))) | 423 | util.printout(cfg.export_lua_cpath:format(util.remove_path_dupes(lr_cpath, ';'))) |
416 | if flags["bin"] then | 424 | if flags["bin"] then |
417 | table.insert(bin_dirs, 1, os.getenv("PATH")) | 425 | table.insert(bin_dirs, 1, os.getenv("PATH")) |
418 | local lr_bin = util.remove_path_dupes(table.concat(bin_dirs, cfg.export_path_separator), cfg.export_path_separator) | 426 | local lr_bin = util.remove_path_dupes(table.concat(bin_dirs, cfg.export_path_separator), cfg.export_path_separator) |