Supporting colors on Windows and fixed Android bug.
Fixed some bugs on Windows release.
This commit is contained in:
@@ -87,6 +87,10 @@ enum SdkCommands {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
|
// Enable colors on Windows
|
||||||
|
#[cfg(windows)]
|
||||||
|
colored::control::set_virtual_terminal(true).ok();
|
||||||
|
|
||||||
let cli = Cli::parse();
|
let cli = Cli::parse();
|
||||||
|
|
||||||
print_banner();
|
print_banner();
|
||||||
|
|||||||
@@ -130,12 +130,22 @@ fn run_sdkmanager(sdkmanager: &Path, sdk_root: &Path) -> Result<()> {
|
|||||||
|
|
||||||
pub fn verify(sdk_path: &Path) -> Result<()> {
|
pub fn verify(sdk_path: &Path) -> Result<()> {
|
||||||
if !sdk_path.exists() {
|
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");
|
let platform_tools = sdk_path.join("platform-tools");
|
||||||
if !platform_tools.exists() {
|
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(())
|
Ok(())
|
||||||
|
|||||||
Reference in New Issue
Block a user