cmd/tailscaled: create /usr/local/bin on macOS install-system-daemon if needed

Fixes #1400

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/1404/head
Brad Fitzpatrick 3 years ago
parent 517c90d7e5
commit 3fd00c4a40

@ -11,6 +11,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"path/filepath"
)
func init() {
@ -93,6 +94,9 @@ func installSystemDaemonDarwin(args []string) (err error) {
}()
// Copy ourselves to /usr/local/bin/tailscaled.
if err := os.MkdirAll(filepath.Dir(targetBin), 0755); err != nil {
return err
}
exe, err := os.Executable()
if err != nil {
return fmt.Errorf("failed to find our own executable path: %w", err)

Loading…
Cancel
Save