mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-18 04:10:22 +00:00
47b202554e
This commit adds the Azure SDK for Azure key vault KMS integration to the Ceph CSI driver. Signed-off-by: Praveen M <m.praveen@ibm.com>
22 lines
563 B
Go
22 lines
563 B
Go
package browser
|
|
|
|
import (
|
|
"os/exec"
|
|
"strings"
|
|
)
|
|
|
|
func openBrowser(url string) error {
|
|
providers := []string{"xdg-open", "x-www-browser", "www-browser"}
|
|
|
|
// There are multiple possible providers to open a browser on linux
|
|
// One of them is xdg-open, another is x-www-browser, then there's www-browser, etc.
|
|
// Look for one that exists and run it
|
|
for _, provider := range providers {
|
|
if _, err := exec.LookPath(provider); err == nil {
|
|
return runCmd(provider, url)
|
|
}
|
|
}
|
|
|
|
return &exec.Error{Name: strings.Join(providers, ","), Err: exec.ErrNotFound}
|
|
}
|