Skip to content

Commit 74b152e

Browse files
author
cthorn42
authored
Merge pull request #8883 from joshcooper/require_windows_6x_11459
(PUP-11459) Always load Puppet::Util::Windows
2 parents 82bda0e + 297c11b commit 74b152e

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

Diff for: lib/puppet/util.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
require 'pathname'
88
require 'ostruct'
99
require 'puppet/util/platform'
10+
require 'puppet/util/windows'
1011
require 'puppet/util/symbolic_file_mode'
1112
require 'puppet/file_system/uniquefile'
1213
require 'securerandom'
@@ -22,8 +23,6 @@ module Util
2223
require 'puppet/util/posix'
2324
extend Puppet::Util::POSIX
2425

25-
require 'puppet/util/windows/process' if Puppet::Util::Platform.windows?
26-
2726
extend Puppet::Util::SymbolicFileMode
2827

2928
def default_env

Diff for: lib/puppet/util/monkey_patches.rb

-2
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ def initialize(*args)
7070
end
7171

7272
if Puppet::Util::Platform.windows?
73-
require 'puppet/util/windows'
74-
7573
class OpenSSL::X509::Store
7674
@puppet_certs_loaded = false
7775
alias __original_set_default_paths set_default_paths

Diff for: spec/unit/util/windows_spec.rb

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper'
4+
5+
describe Puppet::Util::Windows do
6+
%w[
7+
ADSI
8+
ADSI::ADSIObject
9+
ADSI::User
10+
ADSI::UserProfile
11+
ADSI::Group
12+
EventLog
13+
File
14+
Process
15+
Registry
16+
Service
17+
SID
18+
].each do |name|
19+
it "defines Puppet::Util::Windows::#{name}" do
20+
expect(described_class.const_get(name)).to be
21+
end
22+
end
23+
end

0 commit comments

Comments
 (0)