We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
arduino
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 48930a2 commit 33c4d94Copy full SHA for 33c4d94
v2/pkgs/tools.go
@@ -286,8 +286,8 @@ func rename(base string) extract.Renamer {
286
}
287
288
func (t *Tools) readInstalled() error {
289
- t.mutex.Lock()
290
- defer t.mutex.Unlock()
+ t.mutex.RLock()
+ defer t.mutex.RUnlock()
291
// read installed.json
292
installedFile, err := utilities.SafeJoin(t.folder, "installed.json")
293
if err != nil {
@@ -301,8 +301,8 @@ func (t *Tools) readInstalled() error {
301
302
303
func (t *Tools) writeInstalled(path string) error {
304
- t.mutex.RLock()
305
- defer t.mutex.RUnlock()
+ t.mutex.Lock()
+ defer t.mutex.Unlock()
306
307
parts := strings.Split(path, string(filepath.Separator))
308
tool := parts[len(parts)-2]
0 commit comments