From 25022a14719d15d485246a5e616735e029e8de5f Mon Sep 17 00:00:00 2001 From: d3m1gd Date: Sun, 29 May 2022 19:39:31 +0700 Subject: [PATCH] glfw: move git check --- glfw/system_sdk.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glfw/system_sdk.zig b/glfw/system_sdk.zig index 93e8af62..7aea1969 100644 --- a/glfw/system_sdk.zig +++ b/glfw/system_sdk.zig @@ -201,6 +201,8 @@ fn determineSdkRoot(allocator: std.mem.Allocator, org: []const u8, name: []const else => |e| return e, } + ensureGit(allocator); + // If the SDK exists, return it. Otherwise, clone it. if (std.fs.openDirAbsolute(sdk_root_dir, .{})) { const current_revision = try getCurrentGitRevision(allocator, sdk_root_dir); @@ -216,7 +218,6 @@ fn determineSdkRoot(allocator: std.mem.Allocator, org: []const u8, name: []const return sdk_root_dir; } else |err| return switch (err) { error.FileNotFound => { - ensureGit(allocator); std.log.info("cloning required sdk..\ngit clone https://github.com/{s}/{s} '{s}'..\n", .{ org, name, sdk_root_dir }); if (std.mem.startsWith(u8, name, "sdk-macos-")) { if (!try confirmAppleSDKAgreement(allocator)) @panic("cannot continue");