diff --git a/build.rs b/build.rs new file mode 100644 index 00000000..47503fe2 --- /dev/null +++ b/build.rs @@ -0,0 +1,6 @@ +fn main() { + println!( + "cargo:rustc-env=TARGET={}", + std::env::var("TARGET").unwrap() + ); +} \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 727957d7..87ef8e87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,6 +25,7 @@ use openssl_probe; use std::env; use std::io; use std::process::exit; +use structopt::clap::crate_version; use structopt::StructOpt; fn run() -> Result<()> { @@ -41,6 +42,12 @@ fn run() -> Result<()> { let config = Config::load(&base_dirs, opt)?; terminal::set_title(config.set_title()); + debug!("Version: {}", crate_version!()); + debug!("OS: {}", env!("TARGET")); + debug!("{:?}", std::env::args()); + debug!("Binary path: {:?}", std::env::current_exe()); + debug!("Self Update: {:?}", cfg!(feature = "self-update")); + if config.run_in_tmux() && env::var("TOPGRADE_INSIDE_TMUX").is_err() { #[cfg(unix)] {