doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
611 stars 84 forks source link

"edit" command crashes #60

Closed kkga closed 3 years ago

kkga commented 3 years ago
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/kkga/.cargo/registry/src/github.com-1ecc6299db9ec823/rbw-1.2.0/src/edit.rs:44:10

I've tried setting different values for the EDITOR variable, but it seems to have no effect.

doy commented 3 years ago

does /usr/bin/vim exist on your system? what other values for EDITOR did you try?

kkga commented 3 years ago

I've tried any console text editor available on my system (vim, nvim, nano, kak), but it still shows the same error.

I'm on Void Linux.

~ > whereis vim
vim: /usr/bin/vim /usr/share/vim /usr/share/man/man1/vim.1

~ > rbw edit GitHub
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/kkga/.cargo/registry/src/github.com-1ecc6299db9ec823/rbw-1.3.0/src/edit.rs:44:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

~ > which nano
/bin/nano

~ > EDITOR=/bin/nano rbw edit GitHub
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /home/kkga/.cargo/registry/src/github.com-1ecc6299db9ec823/rbw-1.3.0/src/edit.rs:44:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
doy commented 3 years ago

do you have the VISUAL env var set?

kkga commented 3 years ago

do you have the VISUAL env var set?

This did the trick, thanks.

das-s commented 3 years ago

I ran into the same error when VISUAL is set with editor flags, e.g.export VISUAL="emacsclient -c" or export VISUAL="vim -v". Editing without editor flags works though. Could this be related to insufficient escaping?