{"record":{"id":"6b90f5bbeeb95c22","repo":"hashicorp/vagrant","slug":"this-command-was-not-invoked-properly-the-help-fo-6b90f5","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/cloud/version/update.rb","lineNumber":33,"sourceCode":"\n            opts = OptionParser.new do |o|\n              o.banner = \"Usage: vagrant cloud version update [options] organization/box-name version\"\n              o.separator \"\"\n              o.separator \"Updates a version entry on Vagrant Cloud\"\n              o.separator \"\"\n              o.separator \"Options:\"\n              o.separator \"\"\n\n              o.on(\"-d\", \"--description DESCRIPTION\", \"A description for this version\") do |d|\n                options[:description] = d\n              end\n            end\n\n            # Parse the options\n            argv = parse_options(opts)\n            return if !argv\n            if argv.size != 2\n              raise Vagrant::Errors::CLIInvalidUsage,\n                help: opts.help.chomp\n            end\n\n            @client = client_login(@env)\n            org, box_name = argv.first.split('/', 2)\n            version = argv[1]\n\n            update_version(org, box_name, version, @client.token, options)\n          end\n\n          # Update the version of the box\n          # @param [String] org Organization name\n          # @param [String] box_name Box name\n          # @param [String] version Version of the box\n          # @param [String] access_token User Vagrant Cloud access token\n          # @param [Hash] options\n          # @options options [String] :description Description of box version\n          # @return [Integer]","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/cloud/version/update.rb#L15-L51","documentation":"Raised by `vagrant cloud version update` when the positional argument count is not exactly 2 after option parsing. Expected: `vagrant cloud version update <org/box-name> <version>` with optional flags such as -d/--description; argv.size != 2 raises Vagrant::Errors::CLIInvalidUsage with the OptionParser help in %{help}.","triggerScenarios":"`vagrant cloud version update` with 0, 1, or 3+ positional args, e.g. `vagrant cloud version update hashicorp/bionic64` (version missing), or supplying the description as a third positional word instead of via `-d \"text\"`.","commonSituations":"Trying to set the version description by appending text after the version; empty version variables in automation; mixing up argument order (version first, box second).","solutions":["Re-run with exactly two positional arguments: `vagrant cloud version update <org>/<box-name> <version>`.","Pass the description as a flag: `vagrant cloud version update org/box 1.0.0 -d \"new description\"`.","Run `vagrant cloud version update -h` to verify the usage line."],"exampleFix":"# before\nvagrant cloud version update hashicorp/bionic64 1.0.0 updated description\n# after\nvagrant cloud version update hashicorp/bionic64 1.0.0 -d \"updated description\"","handlingStrategy":"validation","validationCode":"abort 'usage: vagrant cloud version update <org/box> <version> [-d DESC]' unless ARGV.length == 2 && ARGV.first.include?('/')\nsystem('vagrant', 'cloud', 'version', 'update', *ARGV)","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Environment.new.cli(['cloud', 'version', 'update', 'org/box', '1.0.0'])\nrescue Vagrant::Errors::CLIInvalidUsage => e\n  warn e.message\n  exit 1\nend","preventionTips":["Pass descriptions via -d, never as a third positional word.","Assert both argv tokens are non-empty before shelling out.","Pin the usage line in scripts with a comment so future edits keep the arg count."],"tags":["vagrant","vagrant-cloud","cli","usage","box-version"],"backgroundTag":"invalid-cli-usage","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}