lint
This commit is contained in:
parent
552bc98551
commit
8a233ca9a6
@ -85,25 +85,6 @@ type FirefoxConfig struct {
|
|||||||
|
|
||||||
func setBookmarkDir(fc *FirefoxConfig) {
|
func setBookmarkDir(fc *FirefoxConfig) {
|
||||||
var err error
|
var err error
|
||||||
// pm := FirefoxProfileManager
|
|
||||||
|
|
||||||
// expand environment variables in path
|
|
||||||
// pm.ConfigDir = filepath.Join(os.ExpandEnv(FirefoxBaseDir))
|
|
||||||
|
|
||||||
// Check if base folder exists
|
|
||||||
// handled by profiles.Detect()
|
|
||||||
// exists, err := utils.CheckDirExists(pm.ConfigDir)
|
|
||||||
// if !exists {
|
|
||||||
// log.Criticalf("the base firefox folder <%s> does not exist", pm.ConfigDir)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if err != nil {
|
|
||||||
// log.Fatal(err)
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Set in NewMozProfileManager
|
|
||||||
// ffProfileLoader.BasePath = pm.ConfigDir
|
|
||||||
|
|
||||||
// load the default profile from the one defined in the config
|
// load the default profile from the one defined in the config
|
||||||
var profile *profiles.Profile
|
var profile *profiles.Profile
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/urfave/cli/v2"
|
"github.com/urfave/cli/v2"
|
||||||
@ -57,12 +56,13 @@ var listProfilesCmd = &cli.Command{
|
|||||||
//Create a browser instance
|
//Create a browser instance
|
||||||
brmod, ok := br.ModInfo().New().(modules.BrowserModule)
|
brmod, ok := br.ModInfo().New().(modules.BrowserModule)
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Criticalf("module <%s> is not a BrowserModule", br.ModInfo().ID)
|
log.Criticalf("<%s> is not a BrowserModule", br.ModInfo().ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
pm, isProfileManager := brmod.(profiles.ProfileManager)
|
pm, isProfileManager := brmod.(profiles.ProfileManager)
|
||||||
if !isProfileManager{
|
if !isProfileManager{
|
||||||
return errors.New("not profile manager")
|
log.Warningf("<%s> is not a profile manager", br.ModInfo().ID)
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
flavours := pm.ListFlavours()
|
flavours := pm.ListFlavours()
|
||||||
|
Loading…
Reference in New Issue
Block a user