{"record":{"id":"bb966911043cc9d4","repo":"hashicorp/vagrant","slug":"vagrant-chef-cant-detect","errorCode":null,"errorMessage":"vagrant.chef_cant_detect","messagePattern":"vagrant\\.chef_cant_detect","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugins/provisioners/chef/installer.rb","lineNumber":24,"sourceCode":"    class Installer\n      def initialize(machine, options = {})\n        @machine     = machine\n        @product     = options.fetch(:product)\n        @channel     = options.fetch(:channel)\n        @version     = options.fetch(:version)\n        @force       = options.fetch(:force)\n        @omnibus_url = options.fetch(:omnibus_url)\n        @options     = options.dup\n      end\n\n      # This handles verifying the Chef installation, installing it if it was\n      # requested, and so on. This method will raise exceptions if things are\n      # wrong.\n      def ensure_installed\n        # If the guest cannot check if Chef is installed, just exit printing a\n        # warning...\n        if !@machine.guest.capability?(:chef_installed)\n          @machine.ui.warn(I18n.t(\"vagrant.chef_cant_detect\"))\n          return\n        end\n\n        if !should_install_chef?\n          @machine.ui.info(I18n.t(\"vagrant.chef_already_installed\",\n            version: @version.to_s))\n          return\n        end\n\n        @machine.ui.detail(I18n.t(\"vagrant.chef_installing\",\n          version: @version.to_s))\n        @machine.guest.capability(:chef_install, @product, @version, @channel, @omnibus_url, @options)\n\n        if !@machine.guest.capability(:chef_installed, @product, @version)\n          raise Provisioner::Base::ChefError, :install_failed\n        end\n      end\n","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/provisioners/chef/installer.rb#L6-L42","documentation":"Error \"vagrant.chef_cant_detect\" thrown in hashicorp/vagrant.","triggerScenarios":"Thrown at plugins/provisioners/chef/installer.rb:24 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}