diff options
author | 2022-03-18 16:04:23 -0700 | |
---|---|---|
committer | 2022-03-18 16:04:23 -0700 | |
commit | d21cfe6202e8db8eed83d32198ee96bbeba585f8 (patch) | |
tree | 9e26c26a7c7fe4a53fafd3e1d633d9d20431bffa | |
parent | 88698bc998494605fb91066a99335feaafc2f751 (diff) | |
download | bun-d21cfe6202e8db8eed83d32198ee96bbeba585f8.tar.gz bun-d21cfe6202e8db8eed83d32198ee96bbeba585f8.tar.zst bun-d21cfe6202e8db8eed83d32198ee96bbeba585f8.zip |
[bun install] Do not set an `$npm_config_prefix`
-rw-r--r-- | src/cli/run_command.zig | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/cli/run_command.zig b/src/cli/run_command.zig index bb96aaf6e..8b0a7bac5 100644 --- a/src/cli/run_command.zig +++ b/src/cli/run_command.zig @@ -779,9 +779,6 @@ pub const RunCommand = struct { this_bundler.env.loadNodeJSConfig(this_bundler.fs) catch {}; this_bundler.env.map.putDefault("npm_config_local_prefix", this_bundler.fs.top_level_dir) catch unreachable; - if (this_bundler.env.get("BUN_INSTALL")) |bun_install| { - this_bundler.env.map.putDefault("npm_config_prefix", bun_install) catch unreachable; - } // we have no way of knowing what version they're expecting without running the node executable // running the node executable is too slow @@ -798,11 +795,6 @@ pub const RunCommand = struct { // we don't care if this fails if (std.fs.selfExePathAlloc(ctx.allocator)) |self_exe_path| { this_bundler.env.map.putDefault("npm_execpath", self_exe_path) catch unreachable; - if (strings.lastIndexOf(self_exe_path, std.fs.path.sep_str ++ "bin" ++ std.fs.path.sep_str)) |bin_dir_i| { - this_bundler.env.map.putDefault("npm_config_prefix", std.fs.path.dirname(self_exe_path[0..bin_dir_i]) orelse "/") catch unreachable; - } else { - this_bundler.env.map.putDefault("npm_config_prefix", std.fs.path.dirname(self_exe_path) orelse "/") catch unreachable; - } } else |_| {} } |