We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee1b802 commit 019c26eCopy full SHA for 019c26e
1 file changed
src/uucore/build.rs
@@ -78,6 +78,14 @@ fn detect_target_utility() -> Option<String> {
78
}
79
80
81
+ // Auto-detect utility name from CARGO_PKG_NAME if it's a uu_* package
82
+ if let Ok(pkg_name) = env::var("CARGO_PKG_NAME") {
83
+ if let Some(util_name) = pkg_name.strip_prefix("uu_") {
84
+ println!("cargo:warning=Auto-detected utility name: {}", util_name);
85
+ return Some(util_name.to_string());
86
+ }
87
88
+
89
// Check for a build configuration file in the target directory
90
if let Ok(target_dir) = env::var("CARGO_TARGET_DIR") {
91
let config_path = std::path::Path::new(&target_dir).join("uucore_target_util.txt");
0 commit comments