Skip to content

Commit

Permalink
fixes for darwin
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Fedchenkov <[email protected]>
  • Loading branch information
giggsoff committed Nov 13, 2020
1 parent 1a85f60 commit 23bfd32
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
3 changes: 2 additions & 1 deletion cmd/edenSetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ var setupCmd = &cobra.Command{
log.Info("GenerateEveCerts done")
}
} else {
log.Info("GenerateEveCerts done")
log.Infof("Certs already exists in certs dir: %s", certsDir)
}
if err := eden.GenerateEVEConfig(certsDir, certsDomain, certsEVEIP, adamPort, apiV1); err != nil {
Expand Down Expand Up @@ -211,7 +212,6 @@ var setupCmd = &cobra.Command{
}
} else {
log.Infof("EVE already exists in dir: %s", eveDist)

}
} else {
if _, err := os.Lstat(eveImageFile); os.IsNotExist(err) {
Expand Down Expand Up @@ -241,6 +241,7 @@ var setupCmd = &cobra.Command{
}
}
} else {
log.Infof("download EVE done: %s", eveImageFile)
log.Infof("EVE already exists in dir: %s", filepath.Dir(eveImageFile))
}
}
Expand Down
14 changes: 7 additions & 7 deletions cmd/eve.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ var ipEveCmd = &cobra.Command{
return nil
},
Run: func(cmd *cobra.Command, args []string) {
statusAdam, err := eden.StatusAdam()
if err == nil && statusAdam != "container doesn't exist" {
if ip, err := eveLastRequests(); err == nil && ip != "" {
fmt.Println(ip)
return
}
if !eveRemote && runtime.GOOS == "darwin" {
fmt.Println("127.0.0.1")
return
}
if ip, err := eveLastRequests(); err == nil && ip != "" {
fmt.Println(ip)
return
}
log.Fatal("not found")
},
}

Expand Down

0 comments on commit 23bfd32

Please sign in to comment.