Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-10-18 11:01:56 -0500 using RuboCop version 0.49.1.
# on 2019-10-30 10:31:01 -0500 using RuboCop version 0.49.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 4
# Offense count: 6
GetText/DecorateFunctionMessage:
Exclude:
- 'lib/puppet/provider/exec/powershell.rb'
- 'lib/puppet/provider/exec/pwsh.rb'
- 'spec/spec_helper_acceptance.rb'

# Offense count: 1
# Offense count: 3
GetText/DecorateString:
Exclude:
- 'lib/puppet/provider/exec/powershell.rb'
- 'lib/puppet/provider/exec/pwsh.rb'
6 changes: 5 additions & 1 deletion lib/puppet/provider/exec/powershell.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require 'puppet/provider/exec'
require 'ruby-pwsh'
begin
require 'ruby-pwsh'
rescue LoadError
raise 'Could not load the "ruby-pwsh" library; is the dependency module puppetlabs-pwshlib installed in this environment?'
end

Puppet::Type.type(:exec).provide :powershell, :parent => Puppet::Provider::Exec do
confine :operatingsystem => :windows
Expand Down
6 changes: 5 additions & 1 deletion lib/puppet/provider/exec/pwsh.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
require 'puppet/provider/exec'
require 'ruby-pwsh'
begin
require 'ruby-pwsh'
rescue LoadError
raise 'Could not load the "ruby-pwsh" library; is the dependency module puppetlabs-pwshlib installed in this environment?'
end

Puppet::Type.type(:exec).provide :pwsh, :parent => Puppet::Provider::Exec do
desc <<-EOT
Expand Down