Skip to content

Commit

Permalink
use HOME env var when relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez committed Nov 10, 2023
1 parent 21efdcb commit a8a5005
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions libs/js_engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,11 +1201,10 @@ mod fns {

#[tokio::test]
async fn test_is_subset() {
assert!(
!is_subset("/home/drbonez", "/home/drbonez/code/fakedir/../../..")
.await
.unwrap()
)
let home = Path::new(&std::env::var("HOME").unwrap());
assert!(!is_subset(home, &home.join("code/fakedir/../../.."))
.await
.unwrap())
}
}

Expand Down

0 comments on commit a8a5005

Please sign in to comment.