mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-10 15:39:07 +02: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.
|
// said still reads as a sentence.
|
||||||
const noOutput = "no output"
|
const noOutput = "no output"
|
||||||
|
|
||||||
// firstLine trims captured output to something that reads in one line.
|
|
||||||
func firstLine(s string) string {
|
func firstLine(s string) string {
|
||||||
s = strings.TrimSpace(s)
|
s = strings.TrimSpace(s)
|
||||||
if s == "" {
|
if s == "" {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build linux || freebsd
|
//go:build linux
|
||||||
|
|
||||||
package elevate
|
package elevate
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//go:build linux || freebsd
|
//go:build linux
|
||||||
|
|
||||||
package elevate
|
package elevate
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,15 @@
|
|||||||
//go:build !windows && !darwin && !linux && !freebsd
|
//go:build !windows && !darwin && !linux
|
||||||
|
|
||||||
package elevate
|
package elevate
|
||||||
|
|
||||||
import "context"
|
import "context"
|
||||||
|
|
||||||
// run reports that this platform has no elevation prompt to drive. Mobile and
|
// run reports that this platform has no elevation prompt to drive.
|
||||||
// WASM builds have no local user to ask in the first place.
|
//
|
||||||
|
// 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 {
|
func run(context.Context, string, []string) error {
|
||||||
return ErrUnavailable
|
return ErrUnavailable
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user