Skip to content

Commit 1589026

Browse files
committed
Block manually setting loc to gs
1 parent 4f4bf03 commit 1589026

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd/mount.go

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"os/signal"
2525
"os/user"
2626
"strconv"
27+
"strings"
2728
"syscall"
2829

2930
"github.com/mattrbianchi/twig"
@@ -132,6 +133,9 @@ func mount(cmd *cobra.Command, args []string) (err error) {
132133
if !flags.HavePermissions(mountpoint) {
133134
return errors.New("incorrect permissions for mountpoint")
134135
}
136+
if strings.HasPrefix(flags.Location, "gs") {
137+
return errors.New("the manual setting of a google cloud location is not permitted, please allow fusera to resolve the location itself")
138+
}
135139
// Location takes longest if there's a failure, so validate it last.
136140
if flags.Location == "" {
137141
flags.Location, err = flags.ResolveLocation()

0 commit comments

Comments
 (0)