Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c99fc5b

Browse files
committed
feat: Libraries (un)install name inconcistency
Fix the inconsistent name of libraries when installing and uninstalling.
1 parent da8fc05 commit c99fc5b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎arduino/libraries/librariesmanager/librariesmanager.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
"github.com/arduino/arduino-cli/arduino/cores"
2525
"github.com/arduino/arduino-cli/arduino/libraries"
2626
"github.com/arduino/arduino-cli/arduino/libraries/librariesindex"
27+
"github.com/arduino/arduino-cli/arduino/utils"
2728
paths "github.com/arduino/go-paths-helper"
2829
"github.com/pmylund/sortutil"
2930
"github.com/sirupsen/logrus"
@@ -209,7 +210,8 @@ func (sc *LibrariesManager) LoadLibrariesFromDir(librariesDir *LibrariesDir) err
209210
// name and version or, if the version is nil, the library installed
210211
// in the sketchbook.
211212
func (sc *LibrariesManager) FindByReference(libRef *librariesindex.Reference) *libraries.Library {
212-
alternatives, have := sc.Libraries[libRef.Name]
213+
saneName := utils.SanitizeName(libRef.Name)
214+
alternatives, have := sc.Libraries[saneName]
213215
if !have {
214216
return nil
215217
}

‎test/conftest.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def run_command(pytestconfig, data_dir, downloads_dir, working_dir):
5656
Useful reference:
5757
http://docs.pyinvoke.org/en/1.2/api/runners.html#invoke.runners.Result
5858
"""
59-
cli_path = os.path.join(pytestconfig.rootdir, "..", "arduino-cli")
59+
cli_path = os.path.join(str(pytestconfig.rootdir), "..", "arduino-cli")
6060
env = {
6161
"ARDUINO_DATA_DIR": data_dir,
6262
"ARDUINO_DOWNLOADS_DIR": downloads_dir,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /