Skip to content

Commit

Permalink
Merge pull request #650 from puppetlabs/CAT-2228
Browse files Browse the repository at this point in the history
(CAT-2228) Update legacy facts
  • Loading branch information
amitkarsale authored Feb 26, 2025
2 parents de3f6ba + f5d229e commit 0867f2b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/facter/vcsrepo_svn_ver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Facter.add(:vcsrepo_svn_ver) do
setcode do
if Facter.value(:operatingsystem) == 'Darwin' && !File.directory?(Facter::Core::Execution.execute('xcode-select -p'))
if Facter.value(:'os.name') == 'Darwin' && !File.directory?(Facter::Core::Execution.execute('xcode-select -p'))
''
else
version = Facter::Core::Execution.execute('svn --version --quiet')
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/vcsrepo/dummy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
desc 'Dummy default provider'

defaultfor feature: :posix
defaultfor operatingsystem: :windows
defaultfor 'os.name': :windows

def working_copy_exists?
providers = begin
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/facter/vcsrepo_svn_ver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
describe 'vcsrepo_svn_ver' do
context 'with valid value' do
before :each do
allow(Facter.fact(:operatingsystem)).to receive(:value).and_return('OpenBSD')
allow(Facter.fact(:'os.name')).to receive(:value).and_return('OpenBSD')
allow(Facter::Core::Execution).to receive(:execute)
.with('svn --version --quiet')
.and_return('1.7.23')
Expand Down

0 comments on commit 0867f2b

Please sign in to comment.