diff --git a/lib/svi/svn_runner.rb b/lib/svi/svn_runner.rb index 058cd88..e448bc1 100644 --- a/lib/svi/svn_runner.rb +++ b/lib/svi/svn_runner.rb @@ -16,6 +16,8 @@ module Svi # Optional arguments. # @option options [Array] :global_args # Global svn arguments to place before the subcommand. + # @option options [Boolean] :allow_interactive + # Allow interaction with svn command. # # @yield [line] # If a block is given, each line that the Subversion command writes to @@ -27,9 +29,11 @@ module Svi # @raise [SvnExecError] # If the svn command errors out this exception is raised. def run_svn(subcommand, args, options = {}, &block) + options[:global_args] ||= [] + options[:global_args] << "--non-interactive" unless options[:allow_interactive] command = [ "svn", - *(options[:global_args] || []), + *options[:global_args], subcommand, *args, ].compact