[chef] Re: Accessing copied files with spaces in Windows Package


Chronological Thread 
  • From: Seth Chisamore < >
  • To:
  • Subject: [chef] Re: Accessing copied files with spaces in Windows Package
  • Date: Tue, 10 Jan 2012 12:57:29 -0500

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

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 "<pkg name>"
source "\\nfsserver\mozilla firefox 3.0"  (for example)
<remaining stuff>
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




Archive powered by MHonArc 2.6.16.

§