We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2d1aa0 commit 1a36a2bCopy full SHA for 1a36a2b
v2/pkgs/tools.go
@@ -290,8 +290,8 @@ func rename(base string) extract.Renamer {
290
}
291
292
func (t *Tools) readInstalled() error {
293
- t.mutex.Lock()
294
- defer t.mutex.Unlock()
+ t.mutex.RLock()
+ defer t.mutex.RUnlock()
295
// read installed.json
296
installedFile, err := utilities.SafeJoin(t.folder, "installed.json")
297
if err != nil {
@@ -305,8 +305,8 @@ func (t *Tools) readInstalled() error {
305
306
307
func (t *Tools) writeInstalled(path string) error {
308
- t.mutex.RLock()
309
- defer t.mutex.RUnlock()
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
310
311
parts := strings.Split(path, string(filepath.Separator))
312
tool := parts[len(parts)-2]
0 commit comments