{"record":{"id":"c73b67899384be74","repo":"hashicorp/vagrant","slug":"this-command-was-not-invoked-properly-the-help-fo-c73b67","errorCode":null,"errorMessage":"This command was not invoked properly. The help for this command is available below. %{help}","messagePattern":"This command was not invoked properly\\. The help for this command is available below\\. %(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::CLIInvalidUsage","httpStatus":null,"severity":"error","filePath":"plugins/commands/plugin/command/list.rb","lineNumber":23,"sourceCode":"\nrequire_relative \"base\"\n\nmodule VagrantPlugins\n  module CommandPlugin\n    module Command\n      class List < Base\n        def execute\n          opts = OptionParser.new do |o|\n            o.banner = \"Usage: vagrant plugin list [-h]\"\n\n            # Stub option to allow Vagrantfile loading\n            o.on(\"--local\", \"Include local project plugins\"){|_|}\n          end\n\n          # Parse the options\n          argv = parse_options(opts)\n          return if !argv\n          raise Vagrant::Errors::CLIInvalidUsage, help: opts.help.chomp if argv.length > 0\n\n          # List the installed plugins\n          action(Action.action_list)\n\n          # Success, exit status 0\n          0\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":5,"sourceCodeEnd":35,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/plugin/command/list.rb#L5-L35","documentation":"`vagrant plugin list` takes no positional arguments; only the --local stub flag (kept so Vagrantfile loading works) is accepted. Any leftover argv (argv.length > 0) raises Vagrant::Errors::CLIInvalidUsage with the help text.","triggerScenarios":"`vagrant plugin list vagrant-aws` or any positional word after the subcommand; flags are fine, bare words are not.","commonSituations":"Trying to filter or query a single plugin the way `gem list` or `npm ls` allow; scripts passing a plugin name for a 'does it exist' check.","solutions":["Run bare: `vagrant plugin list`.","Filter with shell tools instead: `vagrant plugin list | grep vagrant-aws`.","Use `vagrant plugin list --local` to include project-local plugins."],"exampleFix":"# before\nvagrant plugin list vagrant-aws\n# after\nvagrant plugin list | grep vagrant-aws","handlingStrategy":"validation","validationCode":"abort 'vagrant plugin list takes no positional arguments' unless ARGV.reject { |a| a.start_with?('-') }.empty?\nsystem('vagrant', 'plugin', 'list')","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Environment.new.cli(['plugin', 'list'])\nrescue Vagrant::Errors::CLIInvalidUsage => e\n  warn e.message\n  exit 1\nend","preventionTips":["Filter output downstream (grep), never via operands.","For existence checks, parse `vagrant plugin list` instead of passing a name."],"tags":["vagrant","plugin","cli","usage"],"backgroundTag":"invalid-cli-usage","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}