cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.87k stars 177 forks source link

thread 'main' panicked #98

Closed asdf23 closed 4 years ago

asdf23 commented 4 years ago

I am trying to install this as root. Yes I know that's a bad idea and accept the risks.

thread 'main' panicked at 'McFly error: Unable to update "/tmp/mcfly.QZo6J2Xm"', src/shell_history.rs:101:29
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
asdf23 commented 4 years ago

Update it was the sticky bit, perhaps unrelated to this code unless there is a desire to fix this. chmod -t /tmp/mcfly.????? fixed it, I'm not sure if I'd need to do that everytime.

cantino commented 4 years ago

Interesting. I've never tried running it as root. You could look at the code that creates the tmp files in mcfly.bash / mcfly.zsh and see if adding a chmod helps you.

asdf23 commented 4 years ago

I didn't look too closely at the code, I would have thought that the tmp file would be random and change each time. Anywho after setting this I did not need to do anything else after a reboot. I did open another ticket (about being able to see the history from different user)