opscode-cookbooks/webpi — pull request #9 by paulmooring (2013-02-15 20:14:48+00:00)
Title: [COOK-2298] Fix for PATH and bad install logic, added check for empty array on grep

This isn't the best fix as it handles the default case of webpi installing to C:\Program Files, but ruby returns Program Files (x86) for both 'ProgramFiles' and 'ProgramFiles(x86)' environmental variables. This fix first checks for WebpiCmd.exe in the path (was assumed before), then checks for the file under 'Program Files' and if it's not found throws an error. Ideally there should be some variable for where the "Program Files" directory is set to per system.

This also fixes the broken logic around `installed?` in the provider.