Skip to content

Commit

Permalink
(FACT-2792) Show not supported message for facter -p. (#2119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Irimie authored Oct 5, 2020
1 parent 7dd07e3 commit 3077c61
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/facter/framework/cli/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ class Cli < Thor
type: :boolean,
desc: 'Enable verbose (info) output.'

class_option :puppet,
type: :boolean,
aliases: '-p',
desc: 'Load the Puppet libraries, thus allowing Facter to load Puppet-specific facts.'

class_option :show_legacy,
type: :boolean,
desc: 'Show legacy facts when querying all facts.'
Expand Down Expand Up @@ -157,6 +152,12 @@ def list_cache_groups(*args)
puts cache_groups
end

desc '--puppet, -p', '(NOT SUPPORTED)Load the Puppet libraries, thus allowing Facter to load Puppet-specific facts.'
map ['--puppet', '-p'] => :puppet
def puppet(*_args)
puts '`facter --puppet` and `facter -p` are no longer supported, use `puppet facts show` instead'
end

desc 'help', 'Help for all arguments'
def help(*args)
help_string = +''
Expand Down

0 comments on commit 3077c61

Please sign in to comment.