ruby-changes:58079
From: NAKAMURA <ko1@a...>
Date: Wed, 2 Oct 2019 13:00:54 +0900 (JST)
Subject: [ruby-changes:58079] 5af2c8735a (master): Should fail if `system` failed
https://git.ruby-lang.org/ruby.git/commit/?id=5af2c8735a From 5af2c8735a22e6b54acf4164b1f1f7bac98e7111 Mon Sep 17 00:00:00 2001 From: NAKAMURA Usaku <usa@r...> Date: Wed, 2 Oct 2019 12:59:59 +0900 Subject: Should fail if `system` failed diff --git a/tool/make-snapshot b/tool/make-snapshot index b3a68ef..95d5bef 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -351,7 +351,10 @@ def package(vcs, rev, destdir, tmp = nil) https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L351 File.directory?(n) or File.rename v, n v = n - system(*%W"patch -d #{v} -p0 -i #{$patch_file}") if $patch_file + if $patch_file && !system(*%W"patch -d #{v} -p0 -i #{$patch_file}") + puts $colorize.fail("patching failed") + return + end def (clean = []).add(n) push(n); n end Dir.chdir(v) do unless File.exist?("ChangeLog") @@ -451,7 +454,10 @@ touch-unicode-files: https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L454 ENV["CACHE_SAVE"] = "no" make = ENV["MAKE"] || ENV["make"] || "make" args = args.map {|arg| arg.join("=")} - system(make, "update-download", *args) + unless system(make, "update-download", *args) + puts $colorize.fail("update-download failed") + return + end clean.push("rbconfig.rb", ".rbconfig.time", "enc.mk", "ext/ripper/y.output", ".revision.time") Dir.glob("**/*") do |dest| next unless File.symlink?(dest) @@ -467,7 +473,10 @@ touch-unicode-files: https://github.com/ruby/ruby/blob/trunk/tool/make-snapshot#L473 end modified = new_time end - system(make, "prepare-package", "clean-cache", *args) + unless system(make, "prepare-package", "clean-cache", *args) + puts $colorize.fail("prepare-package failed") + return + end print "prerequisites" else system(*%W"#{YACC} -o parse.c parse.y") -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/