cookstyle icon indicating copy to clipboard operation
cookstyle copied to clipboard

Detect using powershell to unzip a file

Open tas50 opened this issue 4 years ago • 0 comments

What category of cop is this?:

Please try to select as few as possible.

  • [ ] ChefDeprecations - A cop that alerts on a deprecation in the Chef Infra Client
  • [ ] ChefCorrectness - A cop that alerts when incorrect coding behavior is being used
  • [ ] ChefSharing - A cop that alerts to missing functionality necessary for sharing cookbooks with others
  • [ ] ChefStyle - A cop that alerts to a style best practice
  • [x] ChefModernize - A cop that alerts when a cookbook can be simplified or modernized with new functionality
  • [ ] ChefEffortless - A cop that alerts on code that must be resolved to move to the Effortless pattern

Describe the new cop:

Move more folks over to archive_file

What it would trigger on:

  powershell_script "unzip #{cache_path}" do
    code "Add-Type -A 'System.IO.Compression.FileSystem';" \
        " [IO.Compression.ZipFile]::ExtractToDirectory('#{cache_path}', '#{driver_path}');"
    action :nothing
  end

tas50 avatar Jul 10 '20 19:07 tas50