Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.

Commit ef99eaa

Browse files
authored
Merge pull request #84 from doringeman/misc
compose: fix nil pointer panic in standalone runner validation
2 parents fa939d4 + 02e7351 commit ef99eaa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

commands/compose.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ func newUpCommand() *cobra.Command {
4040
if err != nil {
4141
_ = sendErrorf("Failed to initialize standalone model runner: %v", err)
4242
return fmt.Errorf("Failed to initialize standalone model runner: %w", err)
43-
} else if (kind == desktop.ModelRunnerEngineKindMoby || kind == desktop.ModelRunnerEngineKindCloud) &&
44-
standalone == nil || standalone.gatewayIP == "" || standalone.gatewayPort == 0 {
43+
} else if ((kind == desktop.ModelRunnerEngineKindMoby || kind == desktop.ModelRunnerEngineKindCloud) &&
44+
standalone == nil) ||
45+
(standalone != nil && (standalone.gatewayIP == "" || standalone.gatewayPort == 0)) {
4546
return errors.New("unable to determine standalone runner endpoint")
4647
}
4748

0 commit comments

Comments
 (0)