mirror of
https://github.com/Llewellynvdm/zoxide.git
synced 2024-11-10 23:30:57 +00:00
Start fish in an isolated env (#128)
This commit is contained in:
parent
14b150c1f7
commit
418b82524b
@ -144,7 +144,12 @@ mod tests {
|
|||||||
fn fish_fish_#i() {
|
fn fish_fish_#i() {
|
||||||
let opts = dbg!(&opts()[i]);
|
let opts = dbg!(&opts()[i]);
|
||||||
let source = Fish(opts).render().unwrap();
|
let source = Fish(opts).render().unwrap();
|
||||||
|
|
||||||
|
let tempdir = tempfile::tempdir().unwrap();
|
||||||
|
let tempdir = tempdir.path().to_str().unwrap();
|
||||||
|
|
||||||
Command::new("fish")
|
Command::new("fish")
|
||||||
|
.env("HOME", tempdir) // fish needs a writeable $HOME directory
|
||||||
.args(&["--command", &source, "--private"])
|
.args(&["--command", &source, "--private"])
|
||||||
.assert()
|
.assert()
|
||||||
.success()
|
.success()
|
||||||
|
Loading…
Reference in New Issue
Block a user