diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-05 06:29:58 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-10-05 06:29:58 +0000 |
commit | 1d354095c6c0eaff39f48e000ed04d6c18b1fe15 (patch) | |
tree | 48b685895e2e2f69300e801db331dba542d26e7e /template | |
parent | 70c5a6e095ee385b386dc343c6ef2b356cb8ec6e (diff) | |
download | ruby-1d354095c6c0eaff39f48e000ed04d6c18b1fe15.tar.gz |
ruby-runner.c.in: ignore empty env
* template/ruby-runner.c.in (main): ignore empty or separator-only
value.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r-- | template/ruby-runner.c.in | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/template/ruby-runner.c.in b/template/ruby-runner.c.in index c72a56bbbf..2b285bf540 100644 --- a/template/ruby-runner.c.in +++ b/template/ruby-runner.c.in @@ -14,6 +14,9 @@ main(int argc, char **argv) static const char builddir[] = BUILDDIR; const char *libpath = getenv(LIBPATHENV); if (libpath) { + while (*libpath == PATH_SEP) ++libpath; + } + if (libpath && *libpath) { size_t n = strlen(libpath); char *e = malloc(sizeof(builddir)+n+1); memcpy(e, builddir, sizeof(builddir)-1); |