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 (
2323 "github.com/arduino/arduino-cli/arduino/cores"
2424 "github.com/arduino/arduino-cli/arduino/cores/packageindex"
2525 "github.com/arduino/arduino-cli/executils"
26+ "github.com/arduino/go-paths-helper"
2627 "github.com/pkg/errors"
2728)
2829
@@ -33,6 +34,11 @@ func (pm *PackageManager) InstallPlatform(platformRelease *cores.PlatformRelease
3334 "hardware" ,
3435 platformRelease .Platform .Architecture ,
3536 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 {
3642 if err := platformRelease .Resource .Install (pm .DownloadDir , pm .TempDir , destDir ); err != nil {
3743 return errors .Errorf (tr ("installing platform %[1]s: %[2]s" ), platformRelease , err )
3844 }
You can’t perform that action at this time.
0 commit comments