{"record":{"id":"469b1fc1eef03990","repo":"puppetlabs/puppet","slug":"global-option-option-does-not-exist-in-puppet-s-469b1f","errorCode":null,"errorMessage":"Global option %{option} does not exist in Puppet.settings","messagePattern":"Global option %(.+?) does not exist in Puppet\\.settings","errorType":"exception","errorClass":"ArgumentError","httpStatus":null,"severity":"error","filePath":"lib/puppet/interface/option_manager.rb","lineNumber":15,"sourceCode":"# frozen_string_literal: true\n\n# This class is not actually public API, but the method\n# {Puppet::Interface::OptionManager#option option} is public when used\n# as part of the Faces DSL (i.e. from within a\n# {Puppet::Interface.define define} block).\n# @api public\nmodule Puppet::Interface::OptionManager\n  # @api private\n  def display_global_options(*args)\n    @display_global_options ||= []\n    [args].flatten.each do |refopt|\n      unless Puppet.settings.include?(refopt)\n        # TRANSLATORS 'Puppet.settings' references to the Puppet settings options and should not be translated\n        raise ArgumentError, _(\"Global option %{option} does not exist in Puppet.settings\") % { option: refopt }\n      end\n\n      @display_global_options << refopt if refopt\n    end\n    @display_global_options.uniq!\n    @display_global_options\n  end\n  alias :display_global_option :display_global_options\n\n  def all_display_global_options\n    walk_inheritance_tree(@display_global_options, :all_display_global_options)\n  end\n\n  # @api private\n  def walk_inheritance_tree(start, sym)\n    result = start || []\n    if is_a?(Class) and superclass.respond_to?(sym)\n      result = superclass.send(sym) + result","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/interface/option_manager.rb#L1-L33","documentation":"Puppet::Interface::OptionManager#display_global_options (Faces DSL, aliased as display_global_option) declares which Puppet settings surface as global options on a face. Every name must already exist in Puppet.settings — underscored setting symbols like :environment or :certname — or ArgumentError is raised at face-load time (lib/puppet/interface/option_manager.rb:15).","triggerScenarios":"`display_global_options 'environment', 'colour'` (typo); dasherized names like 'dns-alt-names' (settings are underscored: 'dns_alt_names'); referencing a setting renamed or removed in the Puppet version in use.","commonSituations":"Typos; porting a face to a newer Puppet where a setting was renamed; copying documentation that shows CLI-style dashed flags instead of setting names.","solutions":["Use underscore names exactly as Puppet defines them: `display_global_options 'environment', 'certname'`","Verify membership first: `Puppet.settings.include?(:log_level)`","List valid names via `puppet config print` (or inspect Puppet.settings) to confirm the exact spelling"],"exampleFix":"# before\ndisplay_global_options \"log-level\"\n\n# after\ndisplay_global_options \"log_level\"","handlingStrategy":"validation","validationCode":"names = %w[environment certname]\nunknown = names.reject { |n| Puppet.settings.include?(n) }\nraise ArgumentError, \"not Puppet settings: #{unknown.join(', ')}\" unless unknown.empty?\ndisplay_global_options(*names)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use underscore setting names, never dashed CLI flags","Confirm the setting exists in the target Puppet version before referencing it","Add a startup assertion that validates display_global_options names against Puppet.settings"],"tags":["puppet","faces","settings","dsl","argumenterror"],"backgroundTag":"unknown-config-setting","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}