Sha256: 4d058012c34d100c125224af3aceacd5c23e4184ac3bda62cea41f8a832de0dd

Contents?: true

Size: 287 Bytes

Versions: 32

Compression:

Stored size: 287 Bytes

Contents

package browser

import (
	"errors"
	"os/exec"
)

func openBrowser(url string) error {
	err := runCmd("xdg-open", url)
	if e, ok := err.(*exec.Error); ok && e.Err == exec.ErrNotFound {
		return errors.New("xdg-open: command not found - install xdg-utils from ports(8)")
	}
	return err
}

Version data entries

32 entries across 16 versions & 1 rubygems

Version Path
ruby_snowflake_client-1.3.7 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.7 ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.6 ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.5 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.4 ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.4.pre.debug ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.3.pre.debug ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.2 ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.3.1 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.3.0 ext/vendor/github.com/pkg/browser/browser_freebsd.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/pkg/browser/browser_openbsd.go
ruby_snowflake_client-1.2.1 ext/vendor/github.com/pkg/browser/browser_freebsd.go