From fd9a5ea668e9ffce5fd5f25a7cfd2d45f0eaa85b Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Wed, 26 Feb 2025 00:37:35 -0800 Subject: [PATCH] use `path.joinAbsStringBuf` in `bun outdated` (#17706) Co-authored-by: Jarred Sumner --- src/cli/outdated_command.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cli/outdated_command.zig b/src/cli/outdated_command.zig index 2068c9ff55..985de0dd5f 100644 --- a/src/cli/outdated_command.zig +++ b/src/cli/outdated_command.zig @@ -150,9 +150,10 @@ pub const OutdatedCommand = struct { try workspace_pkg_ids.append(allocator, @intCast(pkg_id)); } + var path_buf: bun.PathBuffer = undefined; + const converted_filters = converted_filters: { const buf = try allocator.alloc(WorkspaceFilter, filters.len); - var path_buf: bun.PathBuffer = undefined; for (filters, buf) |filter, *converted| { converted.* = try WorkspaceFilter.init(allocator, filter, original_cwd, &path_buf); } @@ -183,7 +184,7 @@ pub const OutdatedCommand = struct { else => unreachable, }; - const abs_res_path = path.joinAbsString(FileSystem.instance.top_level_dir, &[_]string{res_path}, .posix); + const abs_res_path = path.joinAbsStringBuf(FileSystem.instance.top_level_dir, &path_buf, &[_]string{res_path}, .posix); if (!glob.walk.matchImpl(allocator, pattern, strings.withoutTrailingSlash(abs_res_path)).matches()) { break :matched false;