{"record":{"id":"c229e17655ed7995","repo":"ruby/rubygems","slug":"the-no-keep-file-descriptors-has-been-removed","errorCode":null,"errorMessage":"The `--no-keep-file-descriptors` has been removed. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to","messagePattern":"The `--no-keep-file-descriptors` has been removed\\. `bundle exec` no longer mess with your file descriptors\\. Close them in the exec'd script if you need to","errorType":"validation","errorClass":"InvalidOption","httpStatus":null,"severity":"error","filePath":"lib/bundler/cli.rb","lineNumber":506,"sourceCode":"\n      require_relative \"cli/cache\"\n      Cache.new(options).run\n    end\n\n    map aliases_for(\"cache\")\n\n    desc \"exec [OPTIONS]\", \"Run the command in context of the bundle\"\n    method_option :keep_file_descriptors, type: :boolean, default: true, banner: \"Passes all file descriptors to the new processes. Default is true, and setting it to false is not permitted (removed).\"\n    method_option :gemfile, type: :string, required: false, banner: \"Use the specified gemfile instead of Gemfile\"\n    long_desc <<-D\n      Exec runs a command, providing it access to the gems in the bundle. While using\n      bundle exec you can require and call the bundled gems as if they were installed\n      into the system wide RubyGems repository.\n    D\n    def exec(*args)\n      if ARGV.include?(\"--no-keep-file-descriptors\")\n        removed_message = \"The `--no-keep-file-descriptors` has been removed. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to\"\n        raise InvalidOption, removed_message\n      end\n\n      require_relative \"cli/exec\"\n      Exec.new(options, args).run\n    end\n\n    map aliases_for(\"exec\")\n\n    desc \"config NAME [VALUE]\", \"Retrieve or set a configuration value\"\n    long_desc <<-D\n      Retrieves or sets a configuration value. If only one parameter is provided, retrieve the value. If two parameters are provided, replace the\n      existing value with the newly provided one.\n\n      By default, setting a configuration value sets it for all projects\n      on the machine.\n\n      If a global setting is superseded by local configuration, this command\n      will show the current value, as well as any superseded values and","sourceCodeStart":488,"sourceCodeEnd":524,"githubUrl":"https://github.com/ruby/rubygems/blob/86cbb817a38ce8477b181c17467a703ded3f2be8/lib/bundler/cli.rb#L488-L524","documentation":"Error \"The `--no-keep-file-descriptors` has been removed. `bundle exec` no longer mess with your file descriptors. Close them in the exec'd script if you need to\" thrown in ruby/rubygems.","triggerScenarios":"Thrown at lib/bundler/cli.rb:506 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":"86cbb817a38ce8477b181c17467a703ded3f2be8","analyzedAt":"2026-08-23T06:27:48.159Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}