diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 00:05:09 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-01-17 00:05:09 +0000 |
commit | b20b9f67c5db0fecc1d7341c192c0b6749a35285 (patch) | |
tree | 3e8405455bb54be4c9a702a5a3230051fbef4a9e /tool | |
parent | 20ad7c926848213193e09008db11a7c70e4af7dd (diff) | |
download | ruby-b20b9f67c5db0fecc1d7341c192c0b6749a35285.tar.gz |
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-x | tool/make-snapshot | 3 |
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) |