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;