From 5735c19b49658763ef98b954cdeccc859bd7e33c Mon Sep 17 00:00:00 2001 From: Jeremy Metz Date: Mon, 14 Oct 2024 13:22:15 +0200 Subject: [PATCH] feat: hyphen to underscore in default android identifier prompt (#405) --- src/config/app/raw.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/config/app/raw.rs b/src/config/app/raw.rs index 46382092..c4bb280d 100644 --- a/src/config/app/raw.rs +++ b/src/config/app/raw.rs @@ -93,7 +93,11 @@ impl Defaults { .to_str() .ok_or_else(|| DefaultsError::CurrentDirInvalidUtf8(cwd.clone()))?; let name = name::transliterate(&dir_name.to_kebab_case()); - let dot_name = name.as_ref().map(|n| format!(".{n}")).unwrap_or_default(); + let dot_name = name + .as_ref() + .map(|n| format!(".{n}")) + .unwrap_or_default() + .replace("-", "_"); Ok(Self { identifier: default_identifier(wrapper, &dot_name) .ok()