mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-03 11:37:09 +00:00
fix(ios): propagate error from BootedUDID instead of silently swallowing
This commit is contained in:
1 parent
55ad503856
commit
071fe3e521
3 files changed
+17
-7
No files matched your search
+8
-5
@@ -55,12 +55,15 @@ func EnsureSimulator(ctx context.Context, deviceName string, stdout io.Writer) e
|
||||
}
|
||||
|
||||
// BootedUDID returns the UDID of the currently booted iOS simulator, or "" if none is booted.
|
||||
func BootedUDID(ctx context.Context) string {
|
||||
d, _ := bootedSimulator(ctx)
|
||||
if d == nil {
|
||||
return ""
|
||||
func BootedUDID(ctx context.Context) (string, error) {
|
||||
d, err := bootedSimulator(ctx)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return d.UDID
|
||||
if d == nil {
|
||||
return "", nil
|
||||
}
|
||||
return d.UDID, nil
|
||||
}
|
||||
|
||||
func bootedSimulator(ctx context.Context) (*simDevice, error) {
|
||||
|
||||
Reference in new issue
Block a user