{"record":{"id":"933eaf0937ab65c1","repo":"hashicorp/vagrant","slug":"is-deprecated-please-use-the-provider-flag-thi","errorCode":null,"errorMessage":"is deprecated. Please use the --provider flag. This","messagePattern":"is deprecated\\. Please use the --provider flag\\. This","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"plugins/commands/box/command/remove.rb","lineNumber":61,"sourceCode":"            end\n\n            o.on(\"--all-architectures\", \"Remove all architectures within a provider a version of the box\") do |a|\n              options[:all_architectures] = a\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          if argv.length == 2\n            # @deprecated\n            @env.ui.warn(\"WARNING: The second argument to `vagrant box remove`\")\n            @env.ui.warn(\"is deprecated. Please use the --provider flag. This\")\n            @env.ui.warn(\"feature will stop working in the next version.\")\n            options[:provider] = argv[1]\n          end\n\n          @env.action_runner.run(Vagrant::Action.action_box_remove, {\n            box_name:     argv[0],\n            box_architecture: options[:architecture],\n            box_provider: options[:provider],\n            box_version:  options[:version],\n            force_confirm_box_remove: options[:force],\n            box_remove_all_versions: options[:all],\n            box_remove_all_providers: options[:all_providers],\n            box_remove_all_architectures: options[:all_architectures]\n          })\n\n          # Success, exit status 0\n          0\n        end","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/box/command/remove.rb#L43-L79","documentation":"Second line of the hardcoded three-line deprecation warning in `vagrant box remove` (remove.rb:61). It is emitted as its own ui.warn call when argv has exactly two entries, telling you the provider-as-second-argument syntax is deprecated and the --provider flag should be used instead. Purely cosmetic split of one sentence across three warn calls; the command still proceeds using argv[1] as the provider.","triggerScenarios":"Exactly the same condition as line 1: `vagrant box remove NAME PROVIDER` with two positional args. The three lines print together whenever argv.length == 2 after option parsing.","commonSituations":"Same as the first line: legacy scripts, aliases, docs. Because each fragment is a separate warn call, log aggregators sometimes capture only one line, making the warning look truncated or mysterious in CI logs.","solutions":["Use the flag form: `vagrant box remove <name> --provider <provider>` to make all three lines disappear.","Grep CI/CD definitions and shell scripts for `vagrant box remove .* .*` patterns and fix them.","If you maintain tooling that shells out to vagrant, add a unit assertion that invocations never pass two positional args to box remove."],"exampleFix":"# before\nsystem(\"vagrant box remove #{name} #{provider}\")\n\n# after\nsystem(\"vagrant box remove #{name} --provider #{provider}\")","handlingStrategy":"validation","validationCode":"# same guard as the first warning line: enforce flag-style invocation\n[ $# -le 1 ] || { echo \"second positional arg deprecated; use --provider\" >&2; exit 2; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Log-parsers: match the full three-line sequence or the 'is deprecated' fragment, since lines arrive as separate warn calls.","Standardize on --provider in team docs and shell libraries.","Test box-removal scripts after every Vagrant upgrade."],"tags":["vagrant","deprecation","box-remove","cli-arguments"],"backgroundTag":"deprecated-positional-argument","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}