Skip to content

Commit 08c5ee8

Browse files
committed
CLI: Actual locally tested fix to race condition
Sorry for making new releases like this. It's that the live Browsh services will only pull in officially released versions. But also that this bug could affect a lot of people installing Browsh themselves.
1 parent 4ca05b9 commit 08c5ee8

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

interfacer/src/browsh/firefox.go

+4-5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"net"
99
"os"
1010
"os/exec"
11+
"path"
1112
"regexp"
1213
"runtime"
1314
"strings"
@@ -230,12 +231,10 @@ func installWebextension() {
230231
if err != nil {
231232
Shutdown(err)
232233
}
233-
file, err := ioutil.TempFile(os.TempDir(), "browsh-webext-addon")
234-
ioutil.WriteFile(file.Name(), []byte(data), 0644)
235-
args := map[string]interface{}{"path": file.Name()}
234+
path := path.Join(os.TempDir(), "browsh-webext-addon")
235+
ioutil.WriteFile(path, []byte(data), 0644)
236+
args := map[string]interface{}{"path": path}
236237
sendFirefoxCommand("Addon:Install", args)
237-
time.Sleep(100 * time.Millisecond)
238-
defer os.Remove(file.Name())
239238
}
240239

241240
// Set a Firefox preference as you would in `about:config`

interfacer/src/browsh/version.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
package browsh
22

3-
var browshVersion = "1.6.3"
3+
var browshVersion = "1.6.4"

0 commit comments

Comments
 (0)