mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-21 06:01:42 +00:00
cmd/tailscale: improve file cp error message in macOS GUI version
Fixes tailscale/corp#1684 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
4512aad889
commit
1e6d512bf0
@ -29,6 +29,7 @@ import (
|
|||||||
"tailscale.com/client/tailscale"
|
"tailscale.com/client/tailscale"
|
||||||
"tailscale.com/client/tailscale/apitype"
|
"tailscale.com/client/tailscale/apitype"
|
||||||
"tailscale.com/ipn"
|
"tailscale.com/ipn"
|
||||||
|
"tailscale.com/version"
|
||||||
)
|
)
|
||||||
|
|
||||||
var fileCmd = &ffcli.Command{
|
var fileCmd = &ffcli.Command{
|
||||||
@ -131,6 +132,9 @@ func runCp(ctx context.Context, args []string) error {
|
|||||||
} else {
|
} else {
|
||||||
f, err := os.Open(fileArg)
|
f, err := os.Open(fileArg)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if version.IsSandboxedMacOS() {
|
||||||
|
return errors.New("the GUI version of Tailscale on macOS runs in a macOS sandbox that can't read files")
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
defer f.Close()
|
defer f.Close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user