Skip to content

Commit f290601

Browse files
committed
Fix for Viper's lowercasing of config keys :/
See spf13/viper#635
1 parent fc92642 commit f290601

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

interfacer/src/browsh/config_sample.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,15 @@ use-existing = false
4242
with-gui = false
4343
4444
# Config that you might usually set through Firefox's 'about:config' page
45-
[firefox-config]
46-
# "privacy.resistFingerprinting" = true
45+
# Note that string must be wrapped in quotes
46+
# preferences = [
47+
# "privacy.resistFingerprinting=true",
48+
# "network.proxy.http='localhost'",
49+
# "network.proxy.ssl='localhost'",
50+
# "network.proxy.http_port=8118",
51+
# "network.proxy.ssl_port=8118",
52+
# "network.proxy.type=1"
53+
# ]
4754
4855
[tty]
4956
# The time in milliseconds between requesting a new TTY-sized pixel frame.

interfacer/src/browsh/firefox.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ func readMarionette() {
258258
buffer := make([]byte, 4096)
259259
count, err := marionette.Read(buffer)
260260
if err != nil {
261-
Shutdown(err)
261+
Log("Error reading from Marionette connection")
262+
return
262263
}
263264
Log("FF-MRNT: " + string(buffer[:count]))
264265
}
@@ -277,8 +278,9 @@ func setDefaultFirefoxPreferences() {
277278
for key, value := range defaultFFPrefs {
278279
setFFPreference(key, value)
279280
}
280-
for key, value := range viper.GetStringMapString("firefox-config") {
281-
setFFPreference(key, value)
281+
for _, pref := range viper.GetStringSlice("firefox.preferences") {
282+
parts := strings.SplitN(pref, "=", 2)
283+
setFFPreference(parts[0], parts[1])
282284
}
283285
}
284286

interfacer/src/browsh/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package browsh
22

3-
var browshVersion = "1.6.0"
3+
var browshVersion = "1.6.1"

0 commit comments

Comments
 (0)