Skip to content

Commit

Permalink
Update gnovm/cmd/gno/bug.go
Browse files Browse the repository at this point in the history
Co-authored-by: Manfred Touron <[email protected]>
  • Loading branch information
harry-hov and moul authored Nov 6, 2023
1 parent 7f09241 commit 2ddcb15
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gnovm/cmd/gno/bug.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ func openBrowser(url string) bool {
var cmdArgs []string
switch runtime.GOOS {
case "windows":
cmdArgs = []string{"cmd", "/c", "start"}
cmdArgs = []string{"cmd", "/c", "start", url}
case "darwin":
cmdArgs = []string{"/usr/bin/open"}
cmdArgs = []string{"/usr/bin/open", url}
default: // "linux"
cmdArgs = []string{"xdg-open"}
cmdArgs = []string{"xdg-open", url}

Check warning on line 82 in gnovm/cmd/gno/bug.go

View check run for this annotation

Codecov / codecov/patch

gnovm/cmd/gno/bug.go#L74-L82

Added lines #L74 - L82 were not covered by tests
}

cmd := exec.Command(cmdArgs[0], append(cmdArgs[1:], url)...)
cmd := exec.Command(cmdArgs[0], cmdArgs[1:]...)
if cmd.Start() == nil && isExecutionSuccessfulWithinTimeout(cmd, 3*time.Second) {
return true
}
Expand Down

0 comments on commit 2ddcb15

Please sign in to comment.