From b20b9f67c5db0fecc1d7341c192c0b6749a35285 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 17 Jan 2015 00:05:09 +0000 Subject: make-snapshot: check the first word of commands * tool/make-snapshot: commands stored in environment variables may contain options, so check only the first word. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- tool/make-snapshot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tool/make-snapshot') diff --git a/tool/make-snapshot b/tool/make-snapshot index 7ae5d35c8f..d6e2424dbc 100755 --- a/tool/make-snapshot +++ b/tool/make-snapshot @@ -5,6 +5,7 @@ require 'digest/md5' require 'digest/sha1' require 'digest/sha2' require 'fileutils' +require 'shellwords' require 'tmpdir' require File.expand_path("../vcs", __FILE__) STDOUT.sync = true @@ -91,7 +92,7 @@ $digests ||= DIGESTS $patch_file &&= File.expand_path($patch_file) path = ENV["PATH"].split(File::PATH_SEPARATOR) %w[YACC BASERUBY RUBY MV MINIRUBY].each do |var| - cmd = ENV[var] + cmd, = ENV[var].shellsplit unless path.any? {|dir| file = File.expand_path(cmd, dir) File.file?(file) and File.executable?(file) -- cgit v1.2.3