@@ -428,6 +428,14 @@ func Install(context Context, binPath string, components []string, force bool, t
428428 }
429429 }
430430
431+ if libkb .IsIn (string (ComponentNameMountDir ), components , false ) {
432+ err = installMountDir (context .GetRunMode (), log )
433+ componentResults = append (componentResults , componentResult (string (ComponentNameMountDir ), err ))
434+ if err != nil {
435+ log .Errorf ("Error installing mount directory: %s" , err )
436+ }
437+ }
438+
431439 if libkb .IsIn (string (ComponentNameKBFS ), components , false ) {
432440 err = InstallKBFS (context , binPath , force , timeout , log )
433441 componentResults = append (componentResults , componentResult (string (ComponentNameKBFS ), err ))
@@ -502,7 +510,7 @@ func InstallService(context Context, binPath string, force bool, timeout time.Du
502510 return err
503511 }
504512 UninstallKeybaseServices (context .GetRunMode (), log )
505- log .Debug ("Installing Keybase service (%s, timeout=%s)" , label , timeout )
513+ log .Debug ("Installing service (%s, timeout=%s)" , label , timeout )
506514 if _ , err := installKeybaseService (context , service , plist , timeout , log ); err != nil {
507515 log .Errorf ("Error installing Keybase service: %s" , err )
508516 return err
@@ -544,7 +552,7 @@ func Uninstall(context Context, components []string, log Log) keybase1.Uninstall
544552 var mountDir string
545553 mountDir , err = context .GetMountDir ()
546554 if err == nil {
547- err = UninstallKBFS (context .GetRunMode (), mountDir , true , true , log )
555+ err = UninstallKBFS (context .GetRunMode (), mountDir , true , false , log )
548556 }
549557 componentResults = append (componentResults , componentResult (string (ComponentNameKBFS ), err ))
550558 if err != nil {
@@ -568,6 +576,14 @@ func Uninstall(context Context, components []string, log Log) keybase1.Uninstall
568576 }
569577 }
570578
579+ if libkb .IsIn (string (ComponentNameMountDir ), components , false ) {
580+ err = uninstallMountDir (context .GetRunMode (), log )
581+ componentResults = append (componentResults , componentResult (string (ComponentNameMountDir ), err ))
582+ if err != nil {
583+ log .Errorf ("Error uninstalling mount dir: %s" , err )
584+ }
585+ }
586+
571587 if libkb .IsIn (string (ComponentNameFuse ), components , false ) {
572588 err = uninstallFuse (context .GetRunMode (), log )
573589 componentResults = append (componentResults , componentResult (string (ComponentNameFuse ), err ))
@@ -681,6 +697,11 @@ func uninstallApp(runMode libkb.RunMode, log Log) error {
681697 return execNativeInstallerWithArg ("--uninstall-app" , runMode , log )
682698}
683699
700+ func installMountDir (runMode libkb.RunMode , log Log ) error {
701+ log .Info ("Creating mount directory" )
702+ return execNativeInstallerWithArg ("--install-mountdir" , runMode , log )
703+ }
704+
684705func execNativeInstallerWithArg (arg string , runMode libkb.RunMode , log Log ) error {
685706 appPath , err := AppBundleForPath ()
686707 if err != nil {
0 commit comments