Add more information when running with verbose output

This commit is contained in:
Roey Darwish Dror
2020-02-26 12:27:58 +02:00
parent 6dbb6172b3
commit 6756b02cb0
2 changed files with 13 additions and 0 deletions

6
build.rs Normal file
View File

@@ -0,0 +1,6 @@
fn main() {
println!(
"cargo:rustc-env=TARGET={}",
std::env::var("TARGET").unwrap()
);
}

View File

@@ -25,6 +25,7 @@ use openssl_probe;
use std::env; use std::env;
use std::io; use std::io;
use std::process::exit; use std::process::exit;
use structopt::clap::crate_version;
use structopt::StructOpt; use structopt::StructOpt;
fn run() -> Result<()> { fn run() -> Result<()> {
@@ -41,6 +42,12 @@ fn run() -> Result<()> {
let config = Config::load(&base_dirs, opt)?; let config = Config::load(&base_dirs, opt)?;
terminal::set_title(config.set_title()); 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() { if config.run_in_tmux() && env::var("TOPGRADE_INSIDE_TMUX").is_err() {
#[cfg(unix)] #[cfg(unix)]
{ {