From 70072d8bf61c96ebb6b535bd00affaf36068ff49 Mon Sep 17 00:00:00 2001 From: Filip Tibell Date: Tue, 26 Mar 2024 16:58:39 +0100 Subject: [PATCH] Fix compilation on windows actually for real --- lib/system/env/windows.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/system/env/windows.rs b/lib/system/env/windows.rs index 3361aec..fc1e6d9 100644 --- a/lib/system/env/windows.rs +++ b/lib/system/env/windows.rs @@ -11,8 +11,9 @@ use crate::{ pub async fn add_to_path(home: &Home) -> RokitResult { // NOTE: Calls to canonicalize may use blocking filesystem // operations, so we spawn a task where that's acceptable. + let dir = home.path().join("bin"); let task = spawn_blocking(|| { - let dir = home.path().join("bin").canonicalize()?; + let dir = dir.canonicalize()?; let key = RegKey::predef(HKEY_CURRENT_USER); let env = key.create_subkey("Environment")?.0;