{"record":{"id":"e43d73a5a65c950e","repo":"hashicorp/vagrant","slug":"this-command-was-not-invoked-properly-the-help-fo-e43d73","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/repair.rb","lineNumber":26,"sourceCode":"module VagrantPlugins\n  module CommandPlugin\n    module Command\n      class Repair < Base\n        def execute\n          options = {}\n\n          opts = OptionParser.new do |o|\n            o.banner = \"Usage: vagrant plugin repair [-h]\"\n\n            o.on(\"--local\", \"Repair plugins in local project\") do |l|\n              options[:env_local] = l\n            end\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          if Vagrant::Plugin::Manager.instance.local_file\n            action(Action.action_repair_local, env: @env)\n          end\n\n          # Attempt to repair installed plugins\n          action(Action.action_repair, options)\n\n          # Success, exit status 0\n          0\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":8,"sourceCodeEnd":42,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/plugin/command/repair.rb#L8-L42","documentation":"`vagrant plugin repair` accepts only the --local flag and no positional arguments; argv.length > 0 after parsing raises Vagrant::Errors::CLIInvalidUsage with the help text. Repair rebuilds the installed plugin set's gem dependencies, so it never takes plugin names.","triggerScenarios":"Any positional token: `vagrant plugin repair vagrant-aws`, or a stray word where `--local` was intended.","commonSituations":"Assuming repair targets one broken plugin; habit from other package managers that take package operands.","solutions":["Run bare: `vagrant plugin repair`.","Add `--local` to also repair project-local plugins.","If one plugin stays broken, uninstall and reinstall it individually."],"exampleFix":"# before\nvagrant plugin repair vagrant-aws\n# after\nvagrant plugin repair            # add --local for project plugins","handlingStrategy":"validation","validationCode":"abort 'vagrant plugin repair takes no positional arguments' unless ARGV.reject { |a| a.start_with?('-') }.empty?\nsystem('vagrant', 'plugin', 'repair')","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Environment.new.cli(['plugin', 'repair'])\nrescue Vagrant::Errors::CLIInvalidUsage => e\n  warn e.message\n  exit 1\nend","preventionTips":["Repair is global (plus optional --local); never append names.","If one plugin is the problem, uninstall/reinstall it individually."],"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"}