diff options
author | Aire-One <aireone@aireone.xyz> | 2022-01-25 22:01:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-25 18:01:15 -0300 |
commit | f226ebefb536a8fea5e93863cff0afcdad005ce9 (patch) | |
tree | e556f74af8e478253f83fae81707c603b486fc74 /src | |
parent | 8dae2fce37b75c9c5eefb334b12cd2359ba48d7e (diff) | |
download | luarocks-f226ebefb536a8fea5e93863cff0afcdad005ce9.tar.gz luarocks-f226ebefb536a8fea5e93863cff0afcdad005ce9.tar.bz2 luarocks-f226ebefb536a8fea5e93863cff0afcdad005ce9.zip |
fix `--pin` option so it appears correctly in user docs (#1390)
* fix(build) cmd option `--pin`
The `build` command `--pin` was asigned to the global parser. This fix
this issue by making it a command flag.
* fix(install) cmd option --pin
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cmd/build.lua | 2 | ||||
-rw-r--r-- | src/luarocks/cmd/install.lua | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/luarocks/cmd/build.lua b/src/luarocks/cmd/build.lua index 002c7232..56f0e757 100644 --- a/src/luarocks/cmd/build.lua +++ b/src/luarocks/cmd/build.lua | |||
@@ -36,7 +36,7 @@ function cmd_build.add_to_parser(parser) | |||
36 | "rockspec. Allows to specify a different branch to fetch. Particularly ".. | 36 | "rockspec. Allows to specify a different branch to fetch. Particularly ".. |
37 | 'for "dev" rocks.') | 37 | 'for "dev" rocks.') |
38 | :argname("<name>") | 38 | :argname("<name>") |
39 | parser:flag("--pin", "Create a luarocks.lock file listing the exact ".. | 39 | cmd:flag("--pin", "Create a luarocks.lock file listing the exact ".. |
40 | "versions of each dependency found for this rock (recursively), ".. | 40 | "versions of each dependency found for this rock (recursively), ".. |
41 | "and store it in the rock's directory. ".. | 41 | "and store it in the rock's directory. ".. |
42 | "Ignores any existing luarocks.lock file in the rock's sources.") | 42 | "Ignores any existing luarocks.lock file in the rock's sources.") |
diff --git a/src/luarocks/cmd/install.lua b/src/luarocks/cmd/install.lua index 0d6ad63f..c2e947b2 100644 --- a/src/luarocks/cmd/install.lua +++ b/src/luarocks/cmd/install.lua | |||
@@ -43,6 +43,10 @@ function install.add_to_parser(parser) | |||
43 | "and report if it is available for another Lua version.") | 43 | "and report if it is available for another Lua version.") |
44 | util.deps_mode_option(cmd) | 44 | util.deps_mode_option(cmd) |
45 | cmd:flag("--no-manifest", "Skip creating/updating the manifest") | 45 | cmd:flag("--no-manifest", "Skip creating/updating the manifest") |
46 | cmd:flag("--pin", "If the installed rock is a Lua module, create a ".. | ||
47 | "luarocks.lock file listing the exact versions of each dependency found for ".. | ||
48 | "this rock (recursively), and store it in the rock's directory. ".. | ||
49 | "Ignores any existing luarocks.lock file in the rock's sources.") | ||
46 | -- luarocks build options | 50 | -- luarocks build options |
47 | parser:flag("--pack-binary-rock"):hidden(true) | 51 | parser:flag("--pack-binary-rock"):hidden(true) |
48 | parser:option("--branch"):hidden(true) | 52 | parser:option("--branch"):hidden(true) |