Skip to content

Commit

Permalink
favorites: allow some non-true disable env var values
Browse files Browse the repository at this point in the history
Suggested by jzila.

Issue: #1862
  • Loading branch information
strib committed Oct 22, 2018
1 parent f8c96e0 commit e0057e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libkbfs/favorites.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package libkbfs

import (
"os"
"strings"
"sync"

"github.com/keybase/client/go/protocol/keybase1"
Expand Down Expand Up @@ -76,8 +77,9 @@ type Favorites struct {
}

func newFavoritesWithChan(config Config, reqChan chan *favReq) *Favorites {
disableVal := os.Getenv(disableFavoritesEnvVar)
if len(disableVal) > 0 {
disableVal := strings.ToLower(os.Getenv(disableFavoritesEnvVar))
if len(disableVal) > 0 && disableVal != "0" && disableVal != "false" &&
disableVal != "no" {
config.MakeLogger("").CDebugf(nil,
"Disable favorites due to env var %s=%s",
disableFavoritesEnvVar, disableVal)
Expand Down

0 comments on commit e0057e6

Please sign in to comment.