diff options
| author | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 15:03:13 -0300 |
|---|---|---|
| committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 21:32:40 -0300 |
| commit | cc4c9f6321ebaaf71f8c9c26bd30967e93bd2cbb (patch) | |
| tree | 6863296943c176e063327dbd7c4a485740d810e0 /src | |
| parent | 65c417e0ecda55f44c691df032163a8c08f0b52a (diff) | |
| download | luarocks-cc4c9f6321ebaaf71f8c9c26bd30967e93bd2cbb.tar.gz luarocks-cc4c9f6321ebaaf71f8c9c26bd30967e93bd2cbb.tar.bz2 luarocks-cc4c9f6321ebaaf71f8c9c26bd30967e93bd2cbb.zip | |
path: output PATH by default, change --bin to --no-bin
Diffstat (limited to 'src')
| -rw-r--r-- | src/luarocks/cmd/path.lua | 4 | ||||
| -rw-r--r-- | src/luarocks/util.lua | 1 |
2 files changed, 3 insertions, 2 deletions
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 = [[ | |||
| 13 | Returns the package path currently configured for this installation | 13 | Returns the package path currently configured for this installation |
| 14 | of LuaRocks, formatted as shell commands to update LUA_PATH and LUA_CPATH. | 14 | of LuaRocks, formatted as shell commands to update LUA_PATH and LUA_CPATH. |
| 15 | 15 | ||
| 16 | --bin Adds the system path to the output | 16 | --no-bin Do not export the PATH variable |
| 17 | 17 | ||
| 18 | --append Appends the paths to the existing paths. Default is to prefix | 18 | --append Appends the paths to the existing paths. Default is to prefix |
| 19 | the LR paths to the existing paths. | 19 | the LR paths to the existing paths. |
| @@ -62,7 +62,7 @@ function path_cmd.command(flags) | |||
| 62 | 62 | ||
| 63 | util.printout(fs.export_cmd(lpath_var, util.cleanup_path(lr_path, ';', cfg.lua_version))) | 63 | util.printout(fs.export_cmd(lpath_var, util.cleanup_path(lr_path, ';', cfg.lua_version))) |
| 64 | util.printout(fs.export_cmd(lcpath_var, util.cleanup_path(lr_cpath, ';', cfg.lua_version))) | 64 | util.printout(fs.export_cmd(lcpath_var, util.cleanup_path(lr_cpath, ';', cfg.lua_version))) |
| 65 | if flags["bin"] then | 65 | if not flags["no-bin"] then |
| 66 | util.printout(fs.export_cmd("PATH", util.cleanup_path(lr_bin, path_sep))) | 66 | util.printout(fs.export_cmd("PATH", util.cleanup_path(lr_bin, path_sep))) |
| 67 | end | 67 | end |
| 68 | return true | 68 | 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 = { | |||
| 123 | ["modules"] = true, | 123 | ["modules"] = true, |
| 124 | ["mversion"] = true, | 124 | ["mversion"] = true, |
| 125 | ["namespace"] = "<namespace>", | 125 | ["namespace"] = "<namespace>", |
| 126 | ["no-bin"] = true, | ||
| 126 | ["no-refresh"] = true, | 127 | ["no-refresh"] = true, |
| 127 | ["nodeps"] = true, | 128 | ["nodeps"] = true, |
| 128 | ["old-versions"] = true, | 129 | ["old-versions"] = true, |
