You probably want to execute the command through facter's helper method `Facter::Util::Resolution.exec`. This method has a few benefits:

1) It will set appropriate language environment variables so you don't have to handle localized output
2) It will use its own which implementation to find the executable if not given an absolute path
3) It will return `nil` if the command cannot be found or does not return any output

The above code can then be written as

    if output = Facter::Util::Resolution.exec('blkid')
      devs = output.split('\n')
      ..
    end