Skip to content
Snippets Groups Projects
Unverified Commit 9961cccc authored by Kali Kaneko's avatar Kali Kaneko Committed by meskio
Browse files

[bug] pass bitmask root path from snap

parent a56b1ce6
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,6 @@ const (
var bitmaskRootPaths = []string{
"/usr/sbin/bitmask-root",
"/usr/local/sbin/bitmask-root",
"/snap/bin/riseup-vpn.bitmask-root",
}
type launcher struct {
......@@ -113,6 +112,12 @@ func runBitmaskRoot(arg ...string) error {
}
func bitmaskRootPath() (string, error) {
if os.Getenv("SNAP") != "" {
path := "/snap/bin/riseup-vpn.bitmask-root"
if _, err := os.Stat(path); !os.IsNotExist(err) {
return path, nil
}
}
for _, path := range bitmaskRootPaths {
if _, err := os.Stat(path); !os.IsNotExist(err) {
return path, nil
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment