From 9cadc95b28da1cf6ca8f802292d12cc96a4f2c2d Mon Sep 17 00:00:00 2001 From: drbrain Date: Fri, 11 Oct 2013 21:35:01 +0000 Subject: * NEWS (with all sufficient information): * lib/rake: Update to rake 10.1.0 * bin/rake: ditto. * test/rake: ditto. * NEWS: Update NEWS to include rake 10.1.0 and links to release notes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rake/file_utils.rb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'lib/rake/file_utils.rb') diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb index 606bfb65b5..0f7f459d87 100644 --- a/lib/rake/file_utils.rb +++ b/lib/rake/file_utils.rb @@ -41,24 +41,26 @@ module FileUtils unless options[:noop] res = rake_system(*cmd) status = $? - status = PseudoStatus.new(1) if !res && status.nil? + status = Rake::PseudoStatus.new(1) if !res && status.nil? shell_runner.call(res, status) end end def create_shell_runner(cmd) # :nodoc: show_command = cmd.join(" ") - show_command = show_command[0,42] + "..." unless $trace - lambda { |ok, status| - ok or fail "Command failed with status (#{status.exitstatus}): [#{show_command}]" - } + show_command = show_command[0, 42] + "..." unless $trace + lambda do |ok, status| + ok or + fail "Command failed with status (#{status.exitstatus}): " + + "[#{show_command}]" + end end private :create_shell_runner def set_verbose_option(options) # :nodoc: unless options.key? :verbose options[:verbose] = - Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT || + (Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT) || Rake::FileUtilsExt.verbose_flag end end @@ -74,9 +76,9 @@ module FileUtils # Example: # ruby %{-pe '$_.upcase!' 1 then + if args.length > 1 sh(*([RUBY] + args + [options]), &block) else sh("#{RUBY} #{args.first}", options, &block) @@ -88,7 +90,7 @@ module FileUtils # Attempt to do a normal file link, but fall back to a copy if the link # fails. def safe_ln(*args) - unless LN_SUPPORTED[0] + if ! LN_SUPPORTED[0] cp(*args) else begin -- cgit v1.2.3