From 6d18750fada6d100182faaba7a6ba7d33bb5cd38 Mon Sep 17 00:00:00 2001 From: Jon C Date: Fri, 13 Sep 2024 14:58:43 +0200 Subject: [PATCH] Special-case default run --- sdk/cargo-build-sbf/src/main.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sdk/cargo-build-sbf/src/main.rs b/sdk/cargo-build-sbf/src/main.rs index 9ebee046986715..03bfce2cabd5dd 100644 --- a/sdk/cargo-build-sbf/src/main.rs +++ b/sdk/cargo-build-sbf/src/main.rs @@ -208,6 +208,11 @@ fn semver_version(version: &str) -> String { } fn validate_platform_tools_version(requested_version: &str, builtin_version: &str) -> String { + // Early return here in case it's the first time we're running `cargo build-sbf` + // and we need to create the cache folders + if requested_version == builtin_version { + return builtin_version.to_string(); + } let normalized_requested = semver_version(requested_version); let requested_semver = semver::Version::parse(&normalized_requested).unwrap(); let installed_versions = find_installed_platform_tools();