File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
arduino/cores/packagemanager Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
23
23
"github.com/arduino/arduino-cli/arduino/cores"
24
24
"github.com/arduino/arduino-cli/arduino/cores/packageindex"
25
25
"github.com/arduino/arduino-cli/executils"
26
+ "github.com/arduino/go-paths-helper"
26
27
"github.com/pkg/errors"
27
28
)
28
29
@@ -33,6 +34,11 @@ func (pm *PackageManager) InstallPlatform(platformRelease *cores.PlatformRelease
33
34
"hardware" ,
34
35
platformRelease .Platform .Architecture ,
35
36
platformRelease .Version .String ())
37
+ return pm .InstallPlatformInDirectory (platformRelease , destDir )
38
+ }
39
+
40
+ // InstallPlatformInDirectory installs a specific release of a platform in a specific directory.
41
+ func (pm * PackageManager ) InstallPlatformInDirectory (platformRelease * cores.PlatformRelease , destDir * paths.Path ) error {
36
42
if err := platformRelease .Resource .Install (pm .DownloadDir , pm .TempDir , destDir ); err != nil {
37
43
return errors .Errorf (tr ("installing platform %[1]s: %[2]s" ), platformRelease , err )
38
44
}
You can’t perform that action at this time.
0 commit comments