Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main.zig
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,12 @@ pub fn main() !void {
const versioned_exe = try global_cache_directory.joinZ(arena, &.{ hash.path(), exe_str });
defer arena.free(versioned_exe);

// If we just downloaded the version and there are no additional arguments,
// assume user wanted to do this and exit more gracefully
if (maybe_hash == null and argv_index >= all_args.len) {
std.process.exit(0);
}

const stay_alive = is_init or (builtin.os.tag == .windows);

if (stay_alive) {
Expand Down