Uploaded image for project: 'Facter'
  1. Facter
  2. FACT-1391

--custom-dir does not support trailing slashes on Windows

    XMLWordPrintable

Details

    • Bug
    • Status: Accepted
    • Normal
    • Resolution: Unresolved
    • None
    • None
    • Windows
    • Platform OS

    Description

      When giving facter a directory to look for custom facts, if the path is giving with a trailing slash facter will fail to find the facts in that directory.

      PS C:\Users\HAIL 9000\my_custom_facts> ls
       
       
          Directory: C:\Users\HAIL 9000\my_custom_facts
       
       
      Mode                LastWriteTime         Length Name
      ----                -------------         ------ ----
      -a----        4/14/2016   1:33 PM             71 my_fact.rb
       
       
      PS C:\Users\HAIL 9000\my_custom_facts> cat .\my_fact.rb
      Facter.add('my_fact') do
        setcode do
          'my_fact_value'
        end
      end
      PS C:\Users\HAIL 9000\my_custom_facts> cd 'C:\Users\HAIL 9000\facter\release\'
      PS C:\Users\HAIL 9000\facter\release> .\bin\facter.exe my_fact --custom-dir 'C:\Users\HAIL 9000\my_custom_facts\'
       
      PS C:\Users\HAIL 9000\facter\release> .\bin\facter.exe my_fact --custom-dir 'C:\Users\HAIL 9000\my_custom_facts'
      my_fact_value
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            hailee Hailee Kenney
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Zendesk Support