Skip to content

Commit f1e214d

Browse files
committed
(FACT-3184) Update fact_list_generator task
1 parent 0e9a840 commit f1e214d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tasks/fact_list_generator.rake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ desc 'Create a fact list for the specified os'
44
task :fact_list_generator, [:os_name] do |_, args|
55
ROOT_DIR = Pathname.new(File.expand_path('..', __dir__)) unless defined?(ROOT_DIR)
66

7+
unless args[:os_name]
8+
raise ArgumentError, "Expected an os name, such as `bundle exec rake 'fact_list_generator[Ubuntu]'`"
9+
end
10+
711
require 'facter/framework/core/file_loader'
8-
load_dir(['facts', '**'])
912

1013
os_hierarchy = Facter::OsHierarchy.new
1114
hierarchy = os_hierarchy.construct_hierarchy(args[:os_name])

0 commit comments

Comments
 (0)