mirror of
https://github.com/hykilpikonna/hyfetch.git
synced 2026-03-21 17:24:51 -05:00
[F] Continue even when current path is not found (Fixes #426)
Some checks failed
Shellcheck / check (push) Has been cancelled
Some checks failed
Shellcheck / check (push) Has been cancelled
This commit is contained in:
parent
f32e2df4fa
commit
b81d5fed1b
|
|
@ -155,7 +155,13 @@ pub fn add_pkg_path() -> Result<()> {
|
|||
// Get PATH
|
||||
let pv = &env::var_os("PATH").context("`PATH` env var is not set or invalid")?;
|
||||
let mut path = env::split_paths(pv).collect::<Vec<_>>();
|
||||
let exe = env::current_exe().context("failed to get path of current running executable")?;
|
||||
let exe = match env::current_exe() {
|
||||
Ok(exe) => exe,
|
||||
Err(e) => {
|
||||
debug!("Failed to get path of current running executable: {}", e);
|
||||
return Ok(());
|
||||
}
|
||||
};
|
||||
let base = exe.parent().unwrap();
|
||||
|
||||
// Add from bin: ../git, ../fastfetch, ../scripts
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user