The calling of get_app_version failed if the directory for RAILS_ROOT
contained spaces or special characters such as a '('.  This was
especially problematic for Jenkins testing.

Paired-with: Jacob Helwig <[email protected]>
Paired-with: Pieter van de Bruggen <[email protected]>
Signed-off-by: Michael Stahnke <[email protected]>
---

This fixes a problem that was turned up by the Jenkins CI for the 1.2rc branch. 
 The job name had a
space in it, which ended up causing a problem with the original cd.

 config/initializers/app_version_init.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/config/initializers/app_version_init.rb 
b/config/initializers/app_version_init.rb
index df49f0e..91409c5 100644
--- a/config/initializers/app_version_init.rb
+++ b/config/initializers/app_version_init.rb
@@ -10,7 +10,7 @@ def get_app_version
   if File.exists?(Rails.root.join('VERSION'))
     return File.read(Rails.root.join('VERSION')).strip
   elsif File.directory?(Rails.root.join('.git'))
-    return `cd #{Rails.root}; git describe`.strip! rescue 'unknown'
+    return `cd '#{Rails.root}'; git describe`.strip! rescue 'unknown'
   end
 
   'unknown'
-- 
1.7.4.4

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to