{"record":{"id":"0f74402aee54e75d","repo":"hashicorp/vagrant","slug":"this-command-was-not-invoked-properly-the-help-fo-0f7440","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/release.rb","lineNumber":32,"sourceCode":"            options = {}\n\n            opts = OptionParser.new do |o|\n              o.banner = \"Usage: vagrant cloud version release [options] organization/box-name version\"\n              o.separator \"\"\n              o.separator \"Releases a version entry on Vagrant Cloud\"\n              o.separator \"\"\n              o.separator \"Options:\"\n              o.separator \"\"\n              o.on(\"-f\", \"--[no-]force\", \"Release without confirmation\") do |f|\n                options[:force] = f\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            if !options[:force]\n              @env.ui.warn(I18n.t(\"cloud_command.version.release_warn\", version: argv[1], box: argv.first))\n              cont = @env.ui.ask(I18n.t(\"cloud_command.continue\"))\n              return 1 if cont.strip.downcase != \"y\"\n            end\n\n            @client = client_login(@env)\n            org, box_name = argv.first.split('/', 2)\n            version = argv[1]\n\n            release_version(org, box_name, version, @client.token, options)\n          end\n\n          # Release the box version\n          #","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/cloud/version/release.rb#L14-L50","documentation":"Raised by `vagrant cloud version release` when the number of positional arguments is not exactly 2. The expected signature is `vagrant cloud version release <org/box-name> <version> [-f|--force]`; after parse_options runs, any argv.size != 2 raises Vagrant::Errors::CLIInvalidUsage with the command's OptionParser help text interpolated into %{help}. The two argv entries are then split into the box (org/name) and the version string to release on Vagrant Cloud.","triggerScenarios":"`vagrant cloud version release` with 0, 1, or 3+ positional args: e.g. `vagrant cloud version release hashicorp/bionic64` (version missing), `vagrant cloud version release hashicorp/bionic64 1.0.0 extra`, or embedding the version in the box string (`... release hashicorp/bionic64/1.0.0`). Flags like -f are consumed by the parser and do not count toward the required 2.","commonSituations":"Assuming the version argument is optional; pasting a full Vagrant Cloud box URL instead of the org/box short name; running the command inside scripts where a variable for the version is empty and collapses to one arg.","solutions":["Re-run with exactly two positional arguments: `vagrant cloud version release <org>/<box-name> <version>` (e.g. `vagrant cloud version release hashicorp/bionic64 1.0.0`).","Run `vagrant cloud version release -h` and match the printed Usage line.","Add `-f`/`--force` to skip the y/N confirmation once arguments are correct."],"exampleFix":"# before\nvagrant cloud version release hashicorp/bionic64\n# after\nvagrant cloud version release hashicorp/bionic64 1.0.0","handlingStrategy":"validation","validationCode":"box, version = ARGV\nabort 'usage: vagrant cloud version release <org/box> <version>' unless ARGV.length == 2 && box.include?('/')\nsystem('vagrant', 'cloud', 'version', 'release', box, version)","typeGuard":null,"tryCatchPattern":"begin\n  Vagrant::Environment.new.cli(['cloud', 'version', 'release', 'org/box', '1.0.0'])\nrescue Vagrant::Errors::CLIInvalidUsage => e\n  warn e.message # contains the full help text; fail fast, do not retry\n  exit 1\nend","preventionTips":["Always pass exactly <org/box-name> <version> as two positional words.","Shell out with explicit argv arrays, not interpolated strings, so empty variables fail visibly.","Check the -h output whenever a cloud subcommand rejects your invocation."],"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"}