aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--railties/lib/commands/plugin.rb4
-rw-r--r--railties/lib/tasks/framework.rake4
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