mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
20ad7c9268
commit
b20b9f67c5
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue