From 04171ec20637dc68d64a261669670d13cacbac65 Mon Sep 17 00:00:00 2001 From: Kornel Date: Mon, 6 Jan 2025 19:05:45 +0000 Subject: [PATCH] Support CARGO_BUILD_TARGET Fixes #59 --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 3dc659a..436d22f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -141,7 +141,7 @@ fn main() -> ExitCode { // when installing locally it won't be transferred anywhere, so allow faster compression fast: install || matches.opt_present("fast"), variant: matches.opt_str("variant"), - target: matches.opt_str("target"), + target: matches.opt_str("target").or_else(|| std::env::var("CARGO_BUILD_TARGET").ok()), multiarch, output_path: matches.opt_str("output"), selected_package_name: matches.opt_str("package"),