navi: navi v2.0.3 panics on any input
Describe the bug I install navi v2.0.3 via homebrew, and I’m running the fish shell. It looks like it’s not finding the cheat files, as any input (git, ls) causes a panic.
To Reproduce
- Install using
brew install denisidoro/tools/navi - Run
navi - Enter
git, press enter.
Expected behavior
Built-in git cheats are resolved.
Screenshots
$ brew install denisidoro/tools/navi
==> Installing navi from denisidoro/tools
==> Downloading https://github.com/denisidoro/navi/releases/download/v2.0.3/navi-x86_64-osx.tar.gz
Already downloaded: /Users/austinjones/Library/Caches/Homebrew/downloads/cf9715a19022091baf31700a252c6b4051a927200d9466b9e5a540310f6c9195--navi-x86_64-osx.tar.gz
🍺 /usr/local/Cellar/navi/2.0.3: 28 files, 2.1MB, built in 3 seconds
$ RUST_BACKTRACE=1 navi 1858ms Wed Mar 11 15:21:02 2020
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /rustc/f3e1a954d2ead4e2fc197c7da7d71e6c61bad196/src/libcore/macros/mod.rs:15:40
stack backtrace:
0: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt
1: core::fmt::write
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: std::panicking::rust_panic_with_hook
6: rust_begin_unwind
7: core::panicking::panic_fmt
8: core::panicking::panic
9: navi::cmds::core::main
10: navi::main
11: std::rt::lang_start::{{closure}}
12: std::panicking::try::do_call
13: __rust_maybe_catch_panic
14: std::rt::lang_start_internal
15: main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Versions:
- OS: macOS Mojave
- Shell: fish, version 3.1.0
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (8 by maintainers)
Commits related to this issue
- Handle relative symlinks (#225) Attempts to solve #224 and #223 — committed to denisidoro/navi by denisidoro 4 years ago
I found the problem:
The symlink created by brew isn’t absolute and it’s messing with navi internals.
While I don’t fix this, there are two solutions:
/usr/local/Cellar/...for example)export NAVI_PATH=/usr/local/Cellar/navi/2.0.3/libexec/cheatsto your.bashrc-like fileI’m sorry for the inconvenience.
Closing this because the main issue seems to be fixed. I’m aware the current way navi deals with folders is error-prone but I believe we can tackle that in more specific, future issues.