reujab / silver

A cross-shell customizable powerline-like prompt with icons
MIT License
453 stars 30 forks source link

Unable to run silver on Freebsd 12.2 #85

Open sleepychris opened 2 years ago

sleepychris commented 2 years ago

A freshly compiled silver via cargo will not run on FreeBSD

[chris@shell ~]$ uname -a 
FreeBSD REDACTED_HOST 12.2-RELEASE-p7 FreeBSD 12.2-RELEASE-p7 GENERIC  amd64
[chris@shell ~]$ silver init
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/chris/.cargo/registry/src/github.com-1ecc6299db9ec823/silver-2.0.0/src/main.rs:43:63
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I have run it with the backtrace on and received this:

[chris@shell ~]$ RUST_BACKTRACE=1 silver init
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/chris/.cargo/registry/src/github.com-1ecc6299db9ec823/silver-2.0.0/src/main.rs:43:63
stack backtrace:
   0: rust_begin_unwind
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:515:5
   1: core::panicking::panic_fmt
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:50:5
   3: silver::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Since the full backtrace is verbose, I will hold off on that unless you need it. There is admittedly a good chance that this is a side effect of rust not being tier 1 on FreeBSD x86_64, but I wanted to report here before moving up the chain.

inferiorhumanorgans commented 2 years ago

This is likely not a FreeBSD issue as without a config file in place silver will crash on any platform. Unfortunately the config file structure cannot be serialized to TOML with serde.

https://github.com/alexcrichton/toml-rs/issues/145

https://github.com/alexcrichton/toml-rs/issues/407