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

PR (637): Feature/facter 2/fact 322 remove special casing of empty string - adrienthebo

    Details

    • Type: Task
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Community
    • Labels:
    • Template:

      Description

      Feature/facter 2/fact 322 remove special casing of empty string

      Pull Request Description


      This pull request removes the special casing of the empty string that was scattered across Facter. The main reason that this seems to have been added is that this:

      ```ruby
      Facter.add(:foo) do
      setcode '/this/command/may/return/nothing'
      end
      ```

      Would behave correctly. This pull request removes the special casing from command execution and facts and restricts the special behavior to when Resolutions are evaluating a string. The existing behavior of `setcode 'foo'` will continue to work but the rest of the code base won't have to deal with `Facter::Core::Execution.exec` randomly returning `nil`.


      (webhooks-id: 449fd044620609db5492888077f390e8)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              gepetto-bot gepetto-bot
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support