From 8820043ce682ec24a41f718e60c8a649746ef231 Mon Sep 17 00:00:00 2001 From: RiskyMH Date: Fri, 25 Jul 2025 04:46:52 +1000 Subject: [PATCH] Update node_command.zig --- src/cli/node_command.zig | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cli/node_command.zig b/src/cli/node_command.zig index de13ec06f0..f57581bb32 100644 --- a/src/cli/node_command.zig +++ b/src/cli/node_command.zig @@ -527,7 +527,7 @@ pub const NodeCommand = struct { const path = bun.strings.toWPathNormalized(&buf, version_binary); break :blk bun.sys.access(path, 0); } else bun.sys.access(version_binary, 0); - + if (access_result == .result) { if (set_as_default) { Output.prettyln(" Node.js v{s} is already installed", .{version}); @@ -578,7 +578,7 @@ pub const NodeCommand = struct { const path = bun.strings.toWPathNormalized(&buf, version_binary); break :blk bun.sys.access(path, 0); } else bun.sys.access(version_binary, 0); - + if (access_result2 != .result) { const version_dir = try std.fmt.allocPrint(allocator, "{s}/node-{s}", .{ cache_dir, version }); defer allocator.free(version_dir); @@ -737,7 +737,7 @@ pub const NodeCommand = struct { const path = bun.strings.toWPathNormalized(&buf, version_binary); break :blk bun.sys.access(path, 0); } else bun.sys.access(version_binaryZ3, 0); - + if (access_result3 == .result) { try runNode(allocator, version_binary, args); } else { @@ -760,7 +760,7 @@ pub const NodeCommand = struct { const path = bun.strings.toWPathNormalized(&buf, node_symlink); break :blk bun.sys.access(path, 0); } else bun.sys.access(node_symlink, 0); - + if (access_result4 == .result) { try runNode(allocator, node_symlink, args); return; @@ -925,7 +925,7 @@ pub const NodeCommand = struct { const path = bun.strings.toWPathNormalized(&buf, test_node); break :blk bun.sys.access(path, 0); } else bun.sys.access(test_node, 0); - + if (access_result5 == .result) { found_other_dir = true; }