File tree 2 files changed +3
-3
lines changed
lib/puppet/provider/package
spec/unit/provider/package
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ def self.prefetch(packages)
35
35
36
36
def self . instances
37
37
packages = [ ]
38
- cmd = "#{ command ( :dnf ) } module list -d 0 -e #{ error_level } "
38
+ cmd = "#{ command ( :dnf ) } module list -y - d 0 -e #{ error_level } "
39
39
execute ( cmd ) . each_line do |line |
40
40
# select only lines with actual packages since DNF clutters the output
41
41
next unless line =~ /\[ [eix]\] [, ]/
Original file line number Diff line number Diff line change 241
241
it "does not try to disable if package is already disabled" do
242
242
allow ( described_class ) . to receive ( :command ) . with ( :dnf ) . and_return ( dnf_path )
243
243
allow ( Puppet ::Util ::Execution ) . to receive ( :execute )
244
- . with ( "/usr/bin/dnf module list -d 0 -e 1" )
244
+ . with ( "/usr/bin/dnf module list -y - d 0 -e 1" )
245
245
. and_return ( "baz 1.2 [d][x] common [d], complete Package Description" )
246
246
resource [ :ensure ] = :disabled
247
247
expect ( provider ) . to be_insync ( :disabled )
254
254
255
255
it "returns an array of enabled modules" do
256
256
allow ( Puppet ::Util ::Execution ) . to receive ( :execute )
257
- . with ( "/usr/bin/dnf module list -d 0 -e 1" )
257
+ . with ( "/usr/bin/dnf module list -y - d 0 -e 1" )
258
258
. and_return ( packages )
259
259
260
260
enabled_packages = described_class . instances . map { |package | package . properties }
You can’t perform that action at this time.
0 commit comments