Skip to content

Commit

Permalink
feat: Libraries (un)install name inconcistency (#443)
Browse files Browse the repository at this point in the history
Fix the inconsistent name of libraries when installing
and uninstalling.
  • Loading branch information
howjmay authored and Massimiliano Pippi committed Dec 11, 2019
1 parent f2df284 commit 4f3fec6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arduino/libraries/librariesmanager/librariesmanager.go
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/arduino/arduino-cli/arduino/cores"
"github.com/arduino/arduino-cli/arduino/libraries"
"github.com/arduino/arduino-cli/arduino/libraries/librariesindex"
"github.com/arduino/arduino-cli/arduino/utils"
paths "github.com/arduino/go-paths-helper"
"github.com/pmylund/sortutil"
"github.com/sirupsen/logrus"
Expand Down Expand Up @@ -209,7 +210,8 @@ func (sc *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) err
// name and version or, if the version is nil, the library installed
// in the sketchbook.
func (sc *LibrariesManager) FindByReference(libRef *librariesindex.Reference) *libraries.Library {
alternatives, have := sc.Libraries[libRef.Name]
saneName := utils.SanitizeName(libRef.Name)
alternatives, have := sc.Libraries[saneName]
if !have {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion test/conftest.py
Expand Up @@ -56,7 +56,7 @@ def run_command(pytestconfig, data_dir, downloads_dir, working_dir):
Useful reference:
http://docs.pyinvoke.org/en/1.2/api/runners.html#invoke.runners.Result
"""
cli_path = os.path.join(pytestconfig.rootdir, "..", "arduino-cli")
cli_path = os.path.join(str(pytestconfig.rootdir), "..", "arduino-cli")
env = {
"ARDUINO_DATA_DIR": data_dir,
"ARDUINO_DOWNLOADS_DIR": downloads_dir,
Expand Down

0 comments on commit 4f3fec6

Please sign in to comment.