From f226ebefb536a8fea5e93863cff0afcdad005ce9 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Tue, 25 Jan 2022 22:01:15 +0100 Subject: 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 --- src/luarocks/cmd/build.lua | 2 +- src/luarocks/cmd/install.lua | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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) "rockspec. Allows to specify a different branch to fetch. Particularly ".. 'for "dev" rocks.') :argname("") - parser:flag("--pin", "Create a luarocks.lock file listing the exact ".. + cmd:flag("--pin", "Create a luarocks.lock file listing the exact ".. "versions of each dependency found for this rock (recursively), ".. "and store it in the rock's directory. ".. "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) "and report if it is available for another Lua version.") util.deps_mode_option(cmd) cmd:flag("--no-manifest", "Skip creating/updating the manifest") + cmd:flag("--pin", "If the installed rock is a Lua module, create a ".. + "luarocks.lock file listing the exact versions of each dependency found for ".. + "this rock (recursively), and store it in the rock's directory. ".. + "Ignores any existing luarocks.lock file in the rock's sources.") -- luarocks build options parser:flag("--pack-binary-rock"):hidden(true) parser:option("--branch"):hidden(true) -- cgit v1.2.3-55-g6feb