github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/cmd/cmount/mount_brew.go (about) 1 //go:build brew && darwin 2 3 // Package cmount implements a FUSE mounting system for rclone remotes. 4 // 5 // Build for macos with the brew tag to handle the absence 6 // of fuse and print an appropriate error message 7 package cmount 8 9 import ( 10 "errors" 11 12 "github.com/rclone/rclone/cmd/mountlib" 13 "github.com/rclone/rclone/vfs" 14 ) 15 16 func init() { 17 name := "mount" 18 cmd := mountlib.NewMountCommand(name, false, mount) 19 cmd.Aliases = append(cmd.Aliases, "cmount") 20 mountlib.AddRc("cmount", mount) 21 } 22 23 // mount the file system 24 // 25 // The mount point will be ready when this returns. 26 // 27 // returns an error, and an error channel for the serve process to 28 // report an error when fusermount is called. 29 func mount(_ *vfs.VFS, _ string, _ *mountlib.Options) (<-chan error, func() error, error) { 30 return nil, nil, errors.New("rclone mount is not supported on MacOS when rclone is installed via Homebrew. " + 31 "Please install the rclone binaries available at https://rclone.org/downloads/ " + 32 "instead if you want to use the rclone mount command") 33 }