~gandelman-a/ubuntu/precise/facter/merge922788

« back to all changes in this revision

Viewing changes to lib/facter/application.rb

  • Committer: Package Import Robot
  • Author(s): Adam Gandelman
  • Date: 2011-10-18 10:32:42 UTC
  • mfrom: (1.3.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: package-import@ubuntu.com-20111018103242-ag8i8vejfp8v7b1b
Tags: upstream-1.6.1
ImportĀ upstreamĀ versionĀ 1.6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
      names = argv
11
11
 
12
12
      # Create the facts hash that is printed to standard out.
13
 
      # Pre-load all of the facts, since we can have multiple facts
14
 
      # per file, and since we can't know ahead of time which file a
15
 
      # fact will be in, we'll need to load every file.
16
 
      facts = Facter.to_hash
17
13
      unless names.empty?
18
14
        facts = {}
19
15
        names.each do |name|
26
22
        end
27
23
      end
28
24
 
 
25
      # Print everything if they didn't ask for specific facts.
 
26
      facts ||= Facter.to_hash
 
27
 
29
28
      # Print the facts as YAML and exit
30
29
      if options[:yaml]
31
30
        require 'yaml'