mirror of
https://github.com/netbirdio/netbird.git
synced 2026-08-10 20:15:11 -04:00
Build the elevation prompt only where the app that raises it is built
This commit is contained in:
@@ -6,7 +6,6 @@ import "strings"
|
||||
// said still reads as a sentence.
|
||||
const noOutput = "no output"
|
||||
|
||||
// firstLine trims captured output to something that reads in one line.
|
||||
func firstLine(s string) string {
|
||||
s = strings.TrimSpace(s)
|
||||
if s == "" {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build linux || freebsd
|
||||
//go:build linux
|
||||
|
||||
package elevate
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
//go:build linux || freebsd
|
||||
//go:build linux
|
||||
|
||||
package elevate
|
||||
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
//go:build !windows && !darwin && !linux && !freebsd
|
||||
//go:build !windows && !darwin && !linux
|
||||
|
||||
package elevate
|
||||
|
||||
import "context"
|
||||
|
||||
// run reports that this platform has no elevation prompt to drive. Mobile and
|
||||
// WASM builds have no local user to ask in the first place.
|
||||
// run reports that this platform has no elevation prompt to drive.
|
||||
//
|
||||
// The desktop app is the only caller and is not built for any of these: mobile
|
||||
// and WASM have no local user to ask, and the FreeBSD client ships without a UI.
|
||||
// pkexec would be the mechanism there, and run_unix.go is what to widen if that
|
||||
// changes.
|
||||
func run(context.Context, string, []string) error {
|
||||
return ErrUnavailable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user