From 3c8d425bb23db54f82b1e9711428d42d3922287d Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 7 Nov 2005 09:46:40 +0000 Subject: 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 --- railties/lib/commands/plugin.rb | 4 ++-- 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 -- cgit v1.2.3