From cc4c9f6321ebaaf71f8c9c26bd30967e93bd2cbb Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Sun, 1 Jul 2018 15:03:13 -0300 Subject: path: output PATH by default, change --bin to --no-bin --- src/luarocks/cmd/path.lua | 4 ++-- src/luarocks/util.lua | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/luarocks/cmd/path.lua b/src/luarocks/cmd/path.lua index 0f672a91..9046cd2e 100644 --- a/src/luarocks/cmd/path.lua +++ b/src/luarocks/cmd/path.lua @@ -13,7 +13,7 @@ path_cmd.help = [[ Returns the package path currently configured for this installation of LuaRocks, formatted as shell commands to update LUA_PATH and LUA_CPATH. ---bin Adds the system path to the output +--no-bin Do not export the PATH variable --append Appends the paths to the existing paths. Default is to prefix the LR paths to the existing paths. @@ -62,7 +62,7 @@ function path_cmd.command(flags) util.printout(fs.export_cmd(lpath_var, util.cleanup_path(lr_path, ';', cfg.lua_version))) util.printout(fs.export_cmd(lcpath_var, util.cleanup_path(lr_cpath, ';', cfg.lua_version))) - if flags["bin"] then + if not flags["no-bin"] then util.printout(fs.export_cmd("PATH", util.cleanup_path(lr_bin, path_sep))) end return true diff --git a/src/luarocks/util.lua b/src/luarocks/util.lua index bb81d61b..5903d5f0 100644 --- a/src/luarocks/util.lua +++ b/src/luarocks/util.lua @@ -123,6 +123,7 @@ local supported_flags = { ["modules"] = true, ["mversion"] = true, ["namespace"] = "", + ["no-bin"] = true, ["no-refresh"] = true, ["nodeps"] = true, ["old-versions"] = true, -- cgit v1.2.3-55-g6feb