Skip to content

Commit

Permalink
fix: unexpected preference override.
Browse files Browse the repository at this point in the history
Resolves #1011
  • Loading branch information
ysmood committed Feb 27, 2024
1 parent 0243a30 commit c35d2ab
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/launcher/launcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,9 @@ func (l *Launcher) hasLaunched() bool {

func (l *Launcher) setupUserPreferences() {
userDir := l.Get(flags.UserDataDir)
if userDir == "" {
pref := l.Get(flags.Preferences)

if userDir == "" || pref == "" {
return
}

Expand All @@ -476,12 +478,6 @@ func (l *Launcher) setupUserPreferences() {

path := filepath.Join(userDir, profile, "Preferences")

pref := l.Get(flags.Preferences)

if pref == "" {
pref = "{}"
}

utils.E(utils.OutputFile(path, pref))
}

Expand Down

0 comments on commit c35d2ab

Please sign in to comment.