summaryrefslogtreecommitdiff
path: root/tool
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 00:05:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-17 00:05:09 +0000
commitb20b9f67c5db0fecc1d7341c192c0b6749a35285 (patch)
tree3e8405455bb54be4c9a702a5a3230051fbef4a9e /tool
parent20ad7c926848213193e09008db11a7c70e4af7dd (diff)
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
Diffstat (limited to 'tool')
-rwxr-xr-xtool/make-snapshot3
1 files changed, 2 insertions, 1 deletions
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)