Mohamed Lrhazi
2011-Nov-28 21:11 UTC
[Puppet Users] Puppet Windows: Spaces in file paths a problem?
I thought I read somewhere in Puppet docs/wiki... that it is "recommended" to avoid spaces in file paths, or some similar verbiage, but now I cant find it. Does Puppet have any known issues with spaces in file paths? It would of course scare Windows admins away... So I hope I am wrong in thinking I read that. Thanks a lot, Mohamed. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mohamed Lrhazi
2011-Nov-28 21:15 UTC
[Puppet Users] Re: Puppet Windows: Spaces in file paths a problem?
I found where I read what I read... not directly Puppet, but Ruby: https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting: "If you notice those directories contain spaces, it might be because you installed Ruby in a folder with spaces (highly not recommended) or..." Thanks, Mohamed. On Mon, Nov 28, 2011 at 4:11 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> I thought I read somewhere in Puppet docs/wiki... that it is > "recommended" to avoid spaces in file paths, or some similar verbiage, > but now I cant find it. > > Does Puppet have any known issues with spaces in file paths? It would > of course scare Windows admins away... So I hope I am wrong in > thinking I read that. > > Thanks a lot, > Mohamed. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Josh Cooper
2011-Nov-28 23:28 UTC
Re: [Puppet Users] Re: Puppet Windows: Spaces in file paths a problem?
Hi Mohamed, On Mon, Nov 28, 2011 at 1:15 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> I found where I read what I read... not directly Puppet, but Ruby: > > https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting: > > "If you notice those directories contain spaces, it might be because > you installed Ruby in a folder with spaces (highly not recommended) > or..." > > Thanks, > Mohamed. > > > > On Mon, Nov 28, 2011 at 4:11 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: > > I thought I read somewhere in Puppet docs/wiki... that it is > > "recommended" to avoid spaces in file paths, or some similar verbiage, > > but now I cant find it. > > > > Does Puppet have any known issues with spaces in file paths? It would > > of course scare Windows admins away... So I hope I am wrong in > > thinking I read that. > > > > Thanks a lot, > > Mohamed. > > > >I ran into trouble with spaces in file paths when setting RUBYLIB (in batch files that run our windows rspec tests). I had to convert the paths to their short names and convert backslashes to forward slashes. Without this, ruby would not load from files in directories with spaces. set PWD=%CD% for %%f in ("%PWD%") do set SHORT_PWD=%%~sf set RUBYLIB=%RUBYLIB%;%SHORT_PWD%/vendor/facter/lib set RUBYLIB=%RUBYLIB:\=/% Josh -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Mohamed Lrhazi
2011-Nov-28 23:56 UTC
Re: [Puppet Users] Re: Puppet Windows: Spaces in file paths a problem?
On Mon, Nov 28, 2011 at 6:28 PM, Josh Cooper <josh@puppetlabs.com> wrote:> Hi Mohamed, > > On Mon, Nov 28, 2011 at 1:15 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: >> >> I found where I read what I read... not directly Puppet, but Ruby: >> >> https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting: >> >> "If you notice those directories contain spaces, it might be because >> you installed Ruby in a folder with spaces (highly not recommended) >> or..." >> >> Thanks, >> Mohamed. >> >> >> >> On Mon, Nov 28, 2011 at 4:11 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote: >> > I thought I read somewhere in Puppet docs/wiki... that it is >> > "recommended" to avoid spaces in file paths, or some similar verbiage, >> > but now I cant find it. >> > >> > Does Puppet have any known issues with spaces in file paths? It would >> > of course scare Windows admins away... So I hope I am wrong in >> > thinking I read that. >> > >> > Thanks a lot, >> > Mohamed. >> > >> > > I ran into trouble with spaces in file paths when setting RUBYLIB (in batch > files that run our windows rspec tests). I had to convert the paths to their > short names and convert backslashes to forward slashes. Without this, ruby > would not load from files in directories with spaces. > set PWD=%CD% > for %%f in ("%PWD%") do set SHORT_PWD=%%~sf > set RUBYLIB=%RUBYLIB%;%SHORT_PWD%/vendor/facter/lib > set RUBYLIB=%RUBYLIB:\=/% > Josh > -- > Josh Cooper > Developer, Puppet Labs > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >Thanks Josh. I run into an issue where this Exec would fail if the variable has a space in it: command => "$splunk_home\\bin\\splunk.exe start", but then again that could happen in Unix just as well, not really Windows specific. I had to write: command => "\"$splunk_home\\bin\\splunk.exe\" start", So I am concluding that from the Puppet end-user perspective, there no special issue with spaces in path names, at least not as a Windows specific concern. Thanks a lot, Mohamed. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Josh Cooper
2011-Nov-29 04:39 UTC
Re: [Puppet Users] Re: Puppet Windows: Spaces in file paths a problem?
On Mon, Nov 28, 2011 at 3:56 PM, Mohamed Lrhazi <lrhazi@gmail.com> wrote:> > > Thanks Josh. > > I run into an issue where this Exec would fail if the variable has a > space in it: > > command => "$splunk_home\\bin\\splunk.exe start", > > but then again that could happen in Unix just as well, not really > Windows specific. > > I had to write: > > command => "\"$splunk_home\\bin\\splunk.exe\" start", > > So I am concluding that from the Puppet end-user perspective, there no > special issue with spaces in path names, at least not as a Windows > specific concern.Yep, the command needs to be quoted because it is a string with potentially multiple arguments. I don''t know of any specific Windows issues with spaces, aside from the RUBYLIB issue mentioned earlier, but do let us know if you run into something. Josh -- Josh Cooper Developer, Puppet Labs -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.