Skip to content

Commit

Permalink
client: Only start a browser on Windows or when DISPLAY is set
Browse files Browse the repository at this point in the history
closes #27
  • Loading branch information
Jille committed Aug 18, 2024
1 parent a064b89 commit 6c55413
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ func main() {

if len(circles) == 0 {
address := fmt.Sprintf("http://127.0.0.1:%d/", *httpPort)
go browser.OpenURL(address)
if runtime.GOOS == "windows" || os.Getenv("DISPLAY") != "" {
go browser.OpenURL(address)
}
log.Printf("no circles configured - visit %s to start rufs configuration.", address)
}

Expand Down

0 comments on commit 6c55413

Please sign in to comment.