cookstyle
cookstyle copied to clipboard
Detect using powershell to unzip a file
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