mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
fix(doctor): probe simctl via xcrun instead of PATH lookup
This commit is contained in:
1 parent
34cfba4221
commit
29b5752e44
1 file changed
+10
-1
@@ -64,7 +64,7 @@ func androidChecks() []doctorCheck {
|
||||
func iosChecks() []doctorCheck {
|
||||
return []doctorCheck{
|
||||
{Name: "xcrun on PATH (ios simulator)", Run: checkExecutableOnPath("xcrun")},
|
||||
{Name: "simctl on PATH (ios simulator)", Run: checkExecutableOnPath("simctl")},
|
||||
{Name: "simctl available (ios simulator)", Run: checkSimctl},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,15 @@ func checkChromiumLaunch(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// checkSimctl exercises `xcrun simctl help`: simctl is an xcrun subcommand,
|
||||
// not a standalone binary, so a PATH lookup can never find it.
|
||||
func checkSimctl(ctx context.Context) error {
|
||||
if err := exec.CommandContext(ctx, "xcrun", "simctl", "help").Run(); err != nil {
|
||||
return fmt.Errorf("xcrun simctl help: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func checkSidecarJAR(_ context.Context) error {
|
||||
if sidecarassets.IsPlaceholder() {
|
||||
return fmt.Errorf("placeholder JAR embedded; run `make sidecar && make sanderling` to embed the real fat JAR")
|
||||
|
||||
Reference in new issue
Block a user