diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-11-07 09:46:40 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-11-07 09:46:40 +0000 |
commit | 3c8d425bb23db54f82b1e9711428d42d3922287d (patch) | |
tree | 5660bb7325bfd7c8c18e5245582e3cdccad7fd22 /railties | |
parent | 01cfd2b00afc25fa4ca8e538f59a405e7eec7bb5 (diff) | |
download | rails-3c8d425bb23db54f82b1e9711428d42d3922287d.tar.gz rails-3c8d425bb23db54f82b1e9711428d42d3922287d.tar.bz2 rails-3c8d425bb23db54f82b1e9711428d42d3922287d.zip |
Fail gracefully from svn checks (closes #2700) [Rick Olson]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2907 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/commands/plugin.rb | 4 | ||||
-rw-r--r-- | railties/lib/tasks/framework.rake | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/commands/plugin.rb b/railties/lib/commands/plugin.rb index 4dd8689345..d7c30dbb21 100644 --- a/railties/lib/commands/plugin.rb +++ b/railties/lib/commands/plugin.rb @@ -93,8 +93,8 @@ class RailsEnvironment end def use_svn? - `svn --version` - $?.success? + `svn --version` rescue nil + !$?.nil? && $?.success? end def use_externals? diff --git a/railties/lib/tasks/framework.rake b/railties/lib/tasks/framework.rake index 9835cc6b16..2c1d8fc451 100644 --- a/railties/lib/tasks/framework.rake +++ b/railties/lib/tasks/framework.rake @@ -30,8 +30,8 @@ end desc "Lock this application to the Edge Rails (by exporting from Subversion). Defaults to svn HEAD; do 'rake freeze_edge REVISION=1234' to lock to a specific revision." task :freeze_edge do $verbose = false - `svn --version` - unless $?.success? + `svn --version` rescue nil + unless !$?.nil? && $?.success? $stderr.puts "ERROR: Must have subversion (svn) available in the PATH to lock this application to Edge Rails" exit 1 end |