Skip to content

Commit ef91a40

Browse files
authored
Merge pull request #400 from wendylabsinc/jo/wendy-lite-error
Update `wendy run` error message for unprivisioned lite devices
2 parents 8bee1fa + b32dec4 commit ef91a40

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

  • go/internal/cli/commands

go/internal/cli/commands/run.go

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,23 @@ func runCommand(ctx context.Context, opts runOptions) error {
178178
return runWithProvider(ctx, target.Provider, *target.External, cwd, appCfg.AppID, opts)
179179
}
180180

181-
// Wendy Lite devices don't run the WendyOS agent — they can't execute containers.
181+
// Devices without a reachable WendyOS agent can't execute containers.
182182
if target.Agent == nil {
183-
return fmt.Errorf("selected device is a Wendy Lite device and does not support 'wendy run'; use 'wendy wifi' for provisioning")
183+
// SelectedDevice sets exactly one of Agent/Bluetooth/External.
184+
// At this point we've already handled the External+Provider case above,
185+
// so a nil Agent here typically means we're talking to the device over BLE.
186+
if target.Bluetooth != nil {
187+
if target.Bluetooth.IsWendyAgent() {
188+
// Full WendyOS device reachable only over Bluetooth: instruct user
189+
// to get it onto WiFi / LAN so the agent can be reached.
190+
return fmt.Errorf("selected device is currently reachable only over Bluetooth. To run apps on it, first connect it to WiFi or ensure it has a LAN address, then retry 'wendy run'")
191+
}
192+
// BLE-only Wendy Lite device: these cannot run containers.
193+
return fmt.Errorf("selected device is a Wendy Lite device, which does not support 'wendy run'. To provision it, first connect it to WiFi using 'wendy device wifi connect'")
194+
}
195+
196+
// Fallback: no agent and no Bluetooth/External path we can use.
197+
return fmt.Errorf("selected device does not have a reachable WendyOS agent and cannot run 'wendy run'")
184198
}
185199

186200
// Agent-based run path (existing gRPC pipeline).

0 commit comments

Comments
 (0)