Accessing copied files with spaces in Windows Package

Hi ,

We have a central NFS server from where we pull packages for installation
across several windows VMs. Previously, these worked because they had no
space . Now we are trying to copy a package with spaces in it , and it
looks something like this:

windows_package ""
source “\nfsserver\mozilla firefox 3.0” (for example)

end

This doesn’t seem to work . We thought we hit -
http://tickets.opscode.com/browse/CHEF-1697 but then saw that we are using
chef gem 0.10.6 in which this has been fixed. We constantly get errors
when we try this . We tried a variety of things , from escaping the space
to even adding a “%20” to represent the space.

Can you please help me out with any options that will fix this ?

thanks
Ranjan

Ranjan,
It looks like windows_package currently doesn't gracefully handle source paths with spaces. I just filed a JIRA ticket [0] to get this fixed.

Current workaround would be adding the quotes in your source value…i.e.:

source '"\nfsserver\mozilla firefox 3.0"'

As a side note unless you are doing string interpolation you will want to wrap all path strings in single. This will save you having to properly escaping back slashes and double quotes..basically avoid this abomination:

source ""\\nfsserver\mozilla firefox 3.0""

Hope that helps!

--
Seth Chisamore
Software Design Engineer, Opscode, Inc.
IRC, Skype, Twitter, Github: schisamo

[0] http://tickets.opscode.com/browse/COOK-968

On Tuesday, January 10, 2012 at 12:14 PM, Madhurranjan Mohaan wrote:

Hi ,

We have a central NFS server from where we pull packages for installation across several windows VMs. Previously, these worked because they had no space . Now we are trying to copy a package with spaces in it , and it looks something like this:

windows_package ""
source "\nfsserver\mozilla firefox 3.0" (for example)

end

This doesn't seem to work . We thought we hit - http://tickets.opscode.com/browse/CHEF-1697 but then saw that we are using chef gem 0.10.6 in which this has been fixed. We constantly get errors when we try this . We tried a variety of things , from escaping the space to even adding a "%20" to represent the space.

Can you please help me out with any options that will fix this ?

thanks
Ranjan

Thanks Seth . That doesn't seem to work though as I am also providing the
options. Changing the names of installers to have no space seems to fix it
for now .

---- End output of start /wait "\nfsserver\Installers\Firefox Setup
3.6.3.exe" -ms ----
Ran start /wait "\nfsserver\Installers\Firefox Setup 3.6.3.exe" -ms
returned 1

cheers
Ranjan

On Tue, Jan 10, 2012 at 11:27 PM, Seth Chisamore schisamo@opscode.comwrote:

Ranjan,
It looks like windows_package currently doesn't gracefully handle source
paths with spaces. I just filed a JIRA ticket [0] to get this fixed.

Current workaround would be adding the quotes in your source value…i.e.:

source '"\nfsserver\mozilla firefox 3.0"'

As a side note unless you are doing string interpolation you will want to
wrap all path strings in single. This will save you having to properly
escaping back slashes and double quotes..basically avoid this abomination:

source ""\\nfsserver\mozilla firefox 3.0""

Hope that helps!

--
Seth Chisamore
Software Design Engineer, Opscode, Inc.
IRC, Skype, Twitter, Github: schisamo

[0] http://tickets.opscode.com/browse/COOK-968

On Tuesday, January 10, 2012 at 12:14 PM, Madhurranjan Mohaan wrote:

Hi ,

We have a central NFS server from where we pull packages for installation
across several windows VMs. Previously, these worked because they had no
space . Now we are trying to copy a package with spaces in it , and it
looks something like this:

windows_package ""
source "\nfsserver\mozilla firefox 3.0" (for example)

end

This doesn't seem to work . We thought we hit -
http://tickets.opscode.com/browse/CHEF-1697 but then saw that we are
using chef gem 0.10.6 in which this has been fixed. We constantly get
errors when we try this . We tried a variety of things , from escaping the
space to even adding a "%20" to represent the space.

Can you please help me out with any options that will fix this ?

thanks
Ranjan