diff options
author | John McCrae <john.mccrae@progress.com> | 2021-06-01 11:40:53 -0700 |
---|---|---|
committer | John McCrae <john.mccrae@progress.com> | 2021-06-14 19:01:07 -0700 |
commit | 8210c715d12d21ebf9a2b101bda7a0b3e9d5857f (patch) | |
tree | 66b350b410b28c5f77d65692d9bc74232c379ea0 /lib | |
parent | b1bc4a0fe43ecaf5883d0a65b3ea03e8e73b65cd (diff) | |
download | chef-8210c715d12d21ebf9a2b101bda7a0b3e9d5857f.tar.gz |
Updated the Windows Pagefile resource to use PowerShell over WMI, added a corresponding test file
Signed-off-by: John McCrae <john.mccrae@progress.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chef/resource/windows_pagefile.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/chef/resource/windows_pagefile.rb b/lib/chef/resource/windows_pagefile.rb index 77818125b6..c40d6a485e 100644 --- a/lib/chef/resource/windows_pagefile.rb +++ b/lib/chef/resource/windows_pagefile.rb @@ -120,10 +120,9 @@ class Chef # raise an exception if the target drive location is invalid def pagefile_drive_exist?(pagefile) - if (::Dir.exist?(pagefile[0] + ":\\") == false) + if ::Dir.exist?(pagefile[0] + ":\\") == false raise "You are trying to create a pagefile on a drive that does not exist!" end - # ::Dir.exist?(pagefile[0] + ":\\") ? nil : (raise "You are trying to create a pagefile on a drive that does not exist!") end # See if the pagefile exists |