Supporting colors on Windows and fixed Android bug.

Fixed some bugs on Windows release.
This commit is contained in:
Eric Ratliff
2026-01-25 16:09:17 -06:00
parent 90ed42b3c5
commit d92d49254b
2 changed files with 16 additions and 2 deletions

View File

@@ -87,6 +87,10 @@ enum SdkCommands {
}
fn main() -> Result<()> {
// Enable colors on Windows
#[cfg(windows)]
colored::control::set_virtual_terminal(true).ok();
let cli = Cli::parse();
print_banner();

View File

@@ -130,12 +130,22 @@ fn run_sdkmanager(sdkmanager: &Path, sdk_root: &Path) -> Result<()> {
pub fn verify(sdk_path: &Path) -> Result<()> {
if !sdk_path.exists() {
anyhow::bail!("Android SDK not found at: {}", sdk_path.display());
anyhow::bail!(
"Android SDK not found at: {}\n\
Run 'weevil sdk install' to download it automatically,\n\
or install manually from: https://developer.android.com/studio#command-tools",
sdk_path.display()
);
}
let platform_tools = sdk_path.join("platform-tools");
if !platform_tools.exists() {
anyhow::bail!("Android SDK incomplete: platform-tools not found");
anyhow::bail!(
"Android SDK incomplete: platform-tools not found\n\
Expected at: {}\n\
Run 'weevil sdk install' to complete the installation",
platform_tools.display()
);
}
Ok(())