{"record":{"id":"9698454282d51327","repo":"hashicorp/vagrant","slug":"this-command-was-not-invoked-properly-the-help-fo-969845","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/create.rb","lineNumber":33,"sourceCode":"\n            opts = OptionParser.new do |o|\n              o.banner = \"Usage: vagrant cloud version create [options] organization/box-name version\"\n              o.separator \"\"\n              o.separator \"Creates a version entry on Vagrant Cloud\"\n              o.separator \"\"\n              o.separator \"Options:\"\n              o.separator \"\"\n\n              o.on(\"-d\", \"--description DESCRIPTION\", String, \"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.empty? || argv.length != 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            create_version(org, box_name, version, @client.token, options.slice(:description))\n          end\n\n          # Create a new version of the box\n          #\n          # @param [String] org Organization box is within\n          # @param [String] box_name Name of box\n          # @param [String] box_version Version of box to create\n          # @param [String] access_token User Vagrant Cloud access token\n          # @param [Hash] options\n          # @option options [String] :description Description of box version","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/cloud/version/create.rb#L15-L51","documentation":"`vagrant cloud version create` requires exactly two positional arguments: the `org/box-name` identifier and the version string. The guard `argv.empty? || argv.length != 2` raises CLIInvalidUsage for zero, one, or three-plus entries; the version description is supplied via -d/--description, never positionally.","triggerScenarios":"`vagrant cloud version create myorg/mybox` (version missing); three arguments from an unquoted version or box identifier containing a space; passing the description as a third positional.","commonSituations":"Copying the single-argument style from `vagrant cloud box create`; splitting semantic-version pre-release labels into separate args; scripts forwarding user input unquoted.","solutions":["Use the exact form: `vagrant cloud version create org/box-name version`","Attach the description as an option: `vagrant cloud version create -d \"Initial release\" myorg/mybox 1.0.0`","Check `vagrant cloud version create -h`"],"exampleFix":"# before\nvagrant cloud version create myorg/mybox\n# after\nvagrant cloud version create myorg/mybox 1.0.0","handlingStrategy":"validation","validationCode":"# Ruby: exactly two positionals, identifier slash-separated\npos = args.select { |a| !a.start_with?(\"-\") }\nunless pos.size == 2 && pos.first =~ %r{\\A[^/\\s]+/[^/\\s]+\\z}\n  abort \"usage: vagrant cloud version create org/box-name version\"\nend","typeGuard":null,"tryCatchPattern":"begin\n  env.cli(%w[cloud version create], org_box, version)\nrescue Vagrant::Errors::CLIInvalidUsage => e\n  $stderr.puts e.message.lines.first\n  exit 64\nend","preventionTips":["Keep version strings (including pre-release labels) as one quoted token","Pass descriptions via -d, never as a trailing positional","Compute the next version in your tooling instead of typing it interactively"],"tags":["vagrant","vagrant-cloud","cli","argument-validation","version-management"],"backgroundTag":"cli-invalid-usage","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}