diff options
author | 2022-12-23 00:04:51 -0800 | |
---|---|---|
committer | 2022-12-23 00:04:51 -0800 | |
commit | 75a3c25ff8302be18435520adf3a96c5c59da370 (patch) | |
tree | 8fe60d74c73f3ccd67cc94502428fcd855cbd025 /src | |
parent | 3da9c728d6756de9e3280ac8f8fce8a7515d641f (diff) | |
download | bun-75a3c25ff8302be18435520adf3a96c5c59da370.tar.gz bun-75a3c25ff8302be18435520adf3a96c5c59da370.tar.zst bun-75a3c25ff8302be18435520adf3a96c5c59da370.zip |
add node_modules to bin path
Diffstat (limited to 'src')
-rw-r--r-- | src/cli/bunx_command.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cli/bunx_command.zig b/src/cli/bunx_command.zig index 27c5a1f6a..cc00a1d11 100644 --- a/src/cli/bunx_command.zig +++ b/src/cli/bunx_command.zig @@ -279,7 +279,7 @@ pub const BunxCommand = struct { if (getBinName(&this_bundler, root_dir_info.getFileDescriptor(), bunx_cache_dir, initial_bin_name)) |package_name_for_bin| { // if we check the bin name and its actually the same, we don't need to check $PATH here again if (!strings.eqlLong(package_name_for_bin, initial_bin_name, true)) { - absolute_in_cache_dir = std.fmt.bufPrint(&absolute_in_cache_dir_buf, "{s}/{s}", .{ bunx_cache_dir, package_name_for_bin }) catch unreachable; + absolute_in_cache_dir = std.fmt.bufPrint(&absolute_in_cache_dir_buf, "{s}/node_modules/.bin/{s}", .{ bunx_cache_dir, package_name_for_bin }) catch unreachable; if (bun.which( &path_buf, @@ -398,7 +398,7 @@ pub const BunxCommand = struct { // if we check the bin name and its actually the same, we don't need to check $PATH here again if (!strings.eqlLong(package_name_for_bin, initial_bin_name, true)) { - absolute_in_cache_dir = std.fmt.bufPrint(&absolute_in_cache_dir_buf, "{s}/{s}", .{ bunx_cache_dir, package_name_for_bin }) catch unreachable; + absolute_in_cache_dir = std.fmt.bufPrint(&absolute_in_cache_dir_buf, "{s}/node_modules/.bin/{s}", .{ bunx_cache_dir, package_name_for_bin }) catch unreachable; if (bun.which( &path_buf, |