Skip to content
This repository has been archived by the owner on Jun 19, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' into FACT-2542
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Irimie committed Apr 29, 2020
2 parents 25a3007 + a341e9c commit fbc22d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/framework/detector/os_hierarchy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Facter
class OsHierarchy
def initialize
@log = Log.new(self)
json_file = Util::FileHelper.safe_read('os_hierarchy.json')
json_file = Util::FileHelper.safe_read(File.join(ROOT_DIR, 'os_hierarchy.json'))

begin
@json_os_hierarchy = JSON.parse(json_file)
Expand Down
4 changes: 2 additions & 2 deletions spec/framework/detector/os_hierarchy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
before do
allow(Facter::Util::FileHelper)
.to receive(:safe_read)
.with('os_hierarchy.json')
.with(File.join(ROOT_DIR, 'os_hierarchy.json'))
.and_return(load_fixture('os_hierarchy').read)
allow(Facter::Log).to receive(:new).and_return(log)
end
Expand All @@ -18,7 +18,7 @@
before do
allow(Facter::Util::FileHelper)
.to receive(:safe_read)
.with('os_hierarchy.json')
.with(File.join(ROOT_DIR, 'os_hierarchy.json'))
.and_return(load_fixture('broken_os_hierarchy').read)
end

Expand Down

0 comments on commit fbc22d7

Please sign in to comment.