-
Notifications
You must be signed in to change notification settings - Fork 8
fix: make sure android path is valid #108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughTwo device handler files are updated: Android SDK path resolution now validates path existence before returning it, and error messages in both Android and simulator device startup failures are corrected to include the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
devices/android.go (1)
62-64: LGTM! Robust path validation added.The path existence check prevents using an invalid
ANDROID_HOMEand allows fallback to default SDK locations. This is a solid defensive improvement.Optionally, consider adding verbose logging when
ANDROID_HOMEis set but the path doesn't exist, to help users debug configuration issues:func getAndroidSdkPath() string { sdkPath := os.Getenv("ANDROID_HOME") if sdkPath != "" { if _, err := os.Stat(sdkPath); err == nil { return sdkPath + } else { + utils.Verbose("ANDROID_HOME is set to '%s' but path does not exist, trying default locations", sdkPath) } }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
devices/android.go(2 hunks)devices/simulator.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: lint
🔇 Additional comments (2)
devices/simulator.go (1)
463-463: LGTM! Clear user guidance improvement.The updated error message correctly instructs users to include the
--deviceflag when booting an offline simulator, which aligns with the corresponding change in android.go.devices/android.go (1)
392-392: LGTM! Improved user guidance.The error message now correctly includes the
--deviceflag in the boot command instruction, consistent with the simulator.go change.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.