Skip to content

Commit

Permalink
Merge pull request #2 from kennethloeffler/fix-unix-path-additions
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptibell authored Mar 30, 2024
2 parents 8587440 + 6532a4f commit 244ec3a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/system/env/unix.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::path::PathBuf;

use futures::{stream::FuturesUnordered, TryStreamExt};
use futures::{stream::FuturesUnordered, StreamExt};
use tokio::{
fs::{read_to_string, write},
io::ErrorKind,
Expand Down Expand Up @@ -33,7 +33,7 @@ pub async fn add_to_path(home: &Home) -> RokitResult<bool> {

// Add the path to known shell profiles
let added_any = if let Some(home_dir) = dirs::home_dir() {
let futs = Shell::ALL
Shell::ALL
.iter()
.map(|shell| {
let shell_env_path = home_dir.join(shell.env_file_path());
Expand All @@ -44,11 +44,11 @@ pub async fn add_to_path(home: &Home) -> RokitResult<bool> {
shell_should_create,
)
})
.collect::<FuturesUnordered<_>>();
futs.try_collect::<Vec<_>>()
.await?
.collect::<FuturesUnordered<_>>()
.collect::<Vec<_>>()
.await
.iter()
.any(|added| *added)
.any(Result::is_ok)
} else {
false
};
Expand Down

0 comments on commit 244ec3a

Please sign in to comment.