{"record":{"id":"fd330008219726f8","repo":"hashicorp/vagrant","slug":"this-command-was-not-invoked-properly-the-help-fo-fd3300","errorCode":null,"errorMessage":"This command was not invoked properly. The help for this command is\navailable below.\n\n%{help}","messagePattern":"This command was not invoked properly\\. The help for this command is\navailable below\\.\n\n%(.+?)","errorType":"exception","errorClass":"Vagrant::Errors::CLIInvalidUsage","httpStatus":null,"severity":"error","filePath":"plugins/commands/cloud/box/show.rb","lineNumber":47,"sourceCode":"              o.on(\"--architectures ARCH\", String, \"Filter results by architecture support (can be defined multiple times)\") do |a|\n                options[:architectures].push(a).uniq!\n              end\n              o.on(\"--versions VERSION\", String, \"Display box information for a specific version (can be defined multiple times)\") do |v|\n                options[:versions].push(v).uniq!\n              end\n              o.on(\"--providers PROVIDER\", String, \"Filter results by provider support (can be defined multiple times)\") do |pv|\n                options[:providers].push(pv).uniq!\n              end\n              o.on(\"--[no-]auth\", \"Authenticate with Vagrant Cloud if required before searching\") do |l|\n                options[:quiet] = !l\n              end\n            end\n\n            # Parse the options\n            argv = parse_options(opts)\n            return if !argv\n            if argv.empty? || argv.length > 1\n              raise Vagrant::Errors::CLIInvalidUsage,\n                help: opts.help.chomp\n            end\n\n            @client = client_login(@env, options.slice(:quiet))\n            org, box_name = argv.first.split('/', 2)\n\n            show_box(org, box_name, @client&.token, options.slice(:architectures, :providers, :versions))\n          end\n\n          # Display the requested box to the user\n          #\n          # @param [String] org Organization name of box\n          # @param [String] box_name Name of box\n          # @param [String] access_token User access token\n          # @param [Hash] options Options for box filtering\n          # @option options [String] :versions Specific verisons of box\n          # @return [Integer]\n          def show_box(org, box_name, access_token, options={})","sourceCodeStart":29,"sourceCodeEnd":65,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/cloud/box/show.rb#L29-L65","documentation":"`vagrant cloud box show` requires exactly one positional argument: the `org/box-name` identifier to display. CLIInvalidUsage is raised for an empty argv or more than one entry. All filtering (--architecture, --provider, --[no-]auth) is done through options, never extra positionals.","triggerScenarios":"Running `vagrant cloud box show` with no identifier; appending a version or provider as a second positional such as `vagrant cloud box show myorg/mybox 1.0.0`; an unquoted identifier containing spaces.","commonSituations":"Trying to show a specific version by adding it as an argument (not supported by this command); forgetting which args are positional when moving between cloud subcommands; empty identifier variables in automation.","solutions":["Pass exactly one identifier: `vagrant cloud box show hashicorp/bionic64`","Filter output with options: `vagrant cloud box show --provider virtualbox myorg/mybox`","Check `vagrant cloud box show -h` for the accepted flags"],"exampleFix":"# before\nvagrant cloud box show myorg/mybox 1.0.0\n# after\nvagrant cloud box show --version 1.0.0 myorg/mybox","handlingStrategy":"validation","validationCode":"# Ruby: one positional, slash-separated; everything else must be a flag\npos = argv.reject { |a| a.start_with?(\"-\") }\nunless pos.size == 1 && pos.first =~ %r{\\A[^/\\s]+/[^/\\s]+\\z}\n  abort \"usage: vagrant cloud box show org/box-name [--provider P] ...\"\nend","typeGuard":null,"tryCatchPattern":"begin\n  env.cli(%w[cloud box show], org_box)\nrescue Vagrant::Errors::CLIInvalidUsage => e\n  $stderr.puts e.message.lines.first\n  exit 64\nend","preventionTips":["Use options (--provider, --architecture) for filtering instead of extra args","Do not append versions positionally — this command shows the whole box","Cache `vagrant cloud box show` output in scripts instead of re-parsing help text"],"tags":["vagrant","vagrant-cloud","cli","argument-validation","box-management"],"backgroundTag":"cli-invalid-usage","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}