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