Enable bundled gems in ruby-runner
This commit is contained in:
parent
adbf9c5b36
commit
9baa0f8c8c
Notes:
git
2025-02-06 14:57:20 +00:00
@ -60,6 +60,9 @@ insert_env_path(const char *envname, const char *paths, size_t size, int prepend
|
||||
setenv(envname, env, 1);
|
||||
}
|
||||
|
||||
#define insert_env_path_lit(env, path, prep) \
|
||||
insert_env_path(env, path, sizeof(path), prep)
|
||||
|
||||
#define EXTOUT_DIR BUILDDIR"/"EXTOUT
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@ -81,6 +84,10 @@ main(int argc, char **argv)
|
||||
insert_env_path(LIBPATHENV, builddir, dirsize, 1);
|
||||
insert_env_path("RUBYLIB", rubylib, sizeof(rubylib), 0);
|
||||
|
||||
insert_env_path_lit("GEM_PATH", ABS_SRCDIR"/.bundle", 1);
|
||||
insert_env_path_lit("GEM_PATH", BUILDDIR"/.bundle", 1);
|
||||
if (!getenv("GEM_HOME")) setenv("GEM_HOME", ABS_SRCDIR"/.bundle", 1);
|
||||
|
||||
if (!(p = strrchr(arg0, '/'))) p = arg0; else p++;
|
||||
if (strlen(p) < namesize - 1) {
|
||||
argv[0] = malloc(p - arg0 + namesize);
|
||||
|
@ -275,7 +275,7 @@ class TestProcess < Test::Unit::TestCase
|
||||
end;
|
||||
end
|
||||
|
||||
MANDATORY_ENVS = %w[RUBYLIB RJIT_SEARCH_BUILD_DIR]
|
||||
MANDATORY_ENVS = %w[RUBYLIB GEM_HOME GEM_PATH RJIT_SEARCH_BUILD_DIR]
|
||||
case RbConfig::CONFIG['target_os']
|
||||
when /linux/
|
||||
MANDATORY_ENVS << 'LD_PRELOAD'
|
||||
|
Loading…
x
Reference in New Issue
Block a user