opscode/chef — comment on commit 2efbafeae9ec09a7f7f8c77009bd6994d7706b03
File: chef/lib/chef/shell_out/windows.rb line 158
By pmorton:

Hey John. I will repro this again an send along the stack trace The long and short of it is that if you reference and exe with a space in the name, it tries to execute everything before the space as the program. I.e. "c:\program files\program.exe" fails telling the "c:\program" cannot be found. I have quotes around the whole string. now as you point out, I can wrap it in cmd /c and it works fine.

Let me take a deeper look and see if I can unpack what is happening. I will reassign the bug to me for the moment and try to investigate further.

Cheers,

P

On Nov 13, 2011, at 11:20 AM, "John Keiser" wrote:

> I think it will do the right thing. The else block will only be called if there are no special characters in the line, which includes quotes, so using everything up to the first whitespace will work. More complicated parsing could work as well, and would even allow us to run more commands without cmd.exe--it just requires writing the Windows command parser in Ruby :)
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/opscode/chef/commit/2efbafeae9ec09a7f7f8c77009bd6994d7706b03#commitcomment-714273