From 2dcd9e7eb9e486d4ad316e7e3696fe3f2d5598d8 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Fri, 22 Jul 2022 13:26:31 -0700 Subject: [PATCH] [bun upgrade] Fix version display name for canary build --- src/cli/upgrade_command.zig | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/cli/upgrade_command.zig b/src/cli/upgrade_command.zig index 3add7714ea..b57bfca424 100644 --- a/src/cli/upgrade_command.zig +++ b/src/cli/upgrade_command.zig @@ -672,7 +672,40 @@ pub const UpgradeCommand = struct { Output.printStartEnd(ctx.start_time, std.time.nanoTimestamp()); - Output.prettyErrorln(" Upgraded.\n\nWelcome to bun v{s}!\n\n Report any bugs:\n https://github.com/oven-sh/bun/issues\n\n What's new:\n https://github.com/oven-sh/bun/releases/tag/{s}", .{ version_name, version.tag }); + if (use_canary) { + Output.prettyErrorln( + \\ Upgraded. + \\ + \\ + \\Welcome to bun's latest canary build! + \\ + \\Report any bugs: + \\ https://github.com/oven-sh/bun/issues + \\ + \\What's new: + \\ https://github.com/oven-sh/bun/releases/tag/{s} + \\ + , + .{version.tag}, + ); + } else { + Output.prettyErrorln( + \\ Upgraded. + \\ + \\ + \\Welcome to bun v{s}! + \\ + \\Report any bugs: + \\ https://github.com/oven-sh/bun/issues + \\ + \\What's new: + \\ https://github.com/oven-sh/bun/releases/tag/{s} + \\ + , + .{ version_name, version.tag }, + ); + } + Output.flush(); return; }