Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

thread 'main' panicked at 'McFly error occurs each time I run some command. #377

Open
mhjiang97 opened this issue Nov 13, 2023 · 2 comments

Comments

@mhjiang97
Copy link

Hi! Thank you for developing this incredible tool.

I got this following error each time I run a command in the terminal. I have export TMPDIR=~/tmp/ in my .zshrc.

How can I fix this bug? Thanks in advance.

thread 'main' panicked at 'McFly error: "/Users/jiangminghao/tmp//mcfly.WH9trjgK" file not found', src/shell_history.rs:27:45            
stack backtrace:
   0:        0x1005cd897 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hae51cb91d407e2ef
   1:        0x1004c8fab - core::fmt::write::h746bc0969202388b
   2:        0x1005a680c - std::io::Write::write_fmt::h4098c2c7437a0bd7
   3:        0x1005d1414 - std::sys_common::backtrace::print::h8360bf0158e89b36
   4:        0x1005d11d9 - std::panicking::default_hook::{{closure}}::hedf04c568eb6e0bc
   5:        0x1005d1777 - std::panicking::rust_panic_with_hook::h22edd02828aff274
   6:        0x1005d15b5 - std::panicking::begin_panic_handler::{{closure}}::h6895f44a9b7e2caa
   7:        0x1005d1519 - std::sys_common::backtrace::__rust_end_short_backtrace::h013519e9b77978c5
   8:        0x1005d1502 - _rust_begin_unwind
   9:        0x10075f3f3 - core::panicking::panic_fmt::h2a51b60c12d11322
  10:        0x1004fa832 - mcfly::shell_history::full_history::hd0cb05da61caeaf5
  11:        0x1004fb33d - mcfly::shell_history::last_history_line::h1c006869f2f12496
  12:        0x10051f140 - mcfly::settings::Settings::parse_args::hb1396e1c6558c387
  13:        0x100465e03 - mcfly::main::hdad074955a9c6386
  14:        0x10053a476 - std::sys_common::backtrace::__rust_begin_short_backtrace::hb116ffcb3b4d93a3
  15:        0x100467bfc - _main

my neofetch:

neofetch 
                    'c.          [email protected] 
                 ,xNMM.          ------------------------- 
               .OMMMMo           OS: macOS 14.1 23B74 arm64 
               OMMM0,            Host: Mac14,12 
     .;loddo:' loolloddol;.      Kernel: 23.1.0 
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 3 hours, 24 mins 
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 156 (brew) 
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.9 
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 1920x1080 
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua 
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Quartz Compositor 
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    WM Theme: Blue (Dark) 
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   Terminal: Tabby 
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   CPU: Apple M2 Pro 
    kMMMMMMMMMMMMMMMMMMMMMMd     GPU: Apple M2 Pro 
     ;KMMMMMMMWXXWMMMMMMMk.      Memory: 2205MiB / 16384MiB 
       .cooc,.    .,coo:.
                                                         
                                                         
@mhjiang97
Copy link
Author

mhjiang97 commented Nov 13, 2023

It seems that the ~/tmp/mcfly.xxx that is generated after the first command always gets deleted after a second command.

@cantino
Copy link
Owner

cantino commented Dec 3, 2023

I've never tried customizing my TMPDIR so I'm not sure, sorry. You're welcome to send a PR if you figure it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants