Skip to content

Commit

Permalink
show version (for checking if Nix did not use a cached version)
Browse files Browse the repository at this point in the history
  • Loading branch information
thefossguy committed Apr 22, 2024
1 parent 917da5d commit 1a42713
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ fn main() -> Result<(), Box<dyn Error>> {
let env_args: Vec<String> = env::args().collect();
let dry_run = env_args.contains(&String::from("--dry-run"));

if env_args.contains(&String::from("--version")) {
println!("{}: v{}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
std::process::exit(0);
}

let user = env::var_os("USER")
.unwrap()
.into_string()
Expand Down

0 comments on commit 1a42713

Please sign in to comment.