also replace dashes
authorPeter Palfrader <peter@palfrader.org>
Mon, 21 Dec 2015 19:25:55 +0000 (20:25 +0100)
committerPeter Palfrader <peter@palfrader.org>
Mon, 21 Dec 2015 19:25:55 +0000 (20:25 +0100)
modules/debian-org/lib/facter/paths.rb

index 2394aa6..3fe23c4 100644 (file)
@@ -7,7 +7,7 @@
    /srv/mirrors/debian-debug
    /srv/mirrors/debian-security
 }.each do |path|
-       Facter.add("has" + path.gsub('/','_')) do
+       Facter.add("has" + path.gsub(/[\/-]/,'_')) do
                setcode do
                        if FileTest.exist?(path)
                                true