Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
daee3c68
Commit
daee3c68
authored
Sep 14, 2018
by
Cristian Maglie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not consider bundle/custom platforms while installing/upgrading cores
parent
4f935b80
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
7 deletions
+20
-7
commands/commands.go
commands/commands.go
+12
-1
commands/core/download.go
commands/core/download.go
+1
-1
commands/core/install.go
commands/core/install.go
+1
-1
commands/core/uninstall.go
commands/core/uninstall.go
+1
-1
commands/core/upgrade.go
commands/core/upgrade.go
+1
-1
configs/hardware_directories.go
configs/hardware_directories.go
+4
-2
No files found.
commands/commands.go
View file @
daee3c68
...
...
@@ -67,10 +67,21 @@ var AppName = filepath.Base(os.Args[0])
var
Config
*
configs
.
Configuration
// InitPackageManagerWithoutBundles initializes the PackageManager
// but ignores bundles and user installed cores
func
InitPackageManagerWithoutBundles
()
*
packagemanager
.
PackageManager
{
logrus
.
Info
(
"Package manager will scan only managed hardware folder"
)
fakeResult
:=
false
Config
.
IDEBundledCheckResult
=
&
fakeResult
Config
.
SketchbookDir
=
nil
return
InitPackageManager
()
}
// InitPackageManager initializes the PackageManager
// TODO: for the daemon mode, this might be called at startup, but for now only commands needing the PM will call it
func
InitPackageManager
()
*
packagemanager
.
PackageManager
{
logrus
.
Info
(
"
Loading the default Package index
"
)
logrus
.
Info
(
"
Initializing package manager
"
)
pm
:=
packagemanager
.
NewPackageManager
(
Config
.
IndexesDir
(),
...
...
commands/core/download.go
View file @
daee3c68
...
...
@@ -47,7 +47,7 @@ func runDownloadCommand(cmd *cobra.Command, args []string) {
logrus
.
Info
(
"Executing `arduino core download`"
)
platformsRefs
:=
parsePlatformReferenceArgs
(
args
)
pm
:=
commands
.
InitPackageManager
()
pm
:=
commands
.
InitPackageManager
WithoutBundles
()
for
_
,
platformRef
:=
range
platformsRefs
{
downloadPlatformByRef
(
pm
,
platformRef
)
}
...
...
commands/core/install.go
View file @
daee3c68
...
...
@@ -47,7 +47,7 @@ func runInstallCommand(cmd *cobra.Command, args []string) {
logrus
.
Info
(
"Executing `arduino core download`"
)
platformsRefs
:=
parsePlatformReferenceArgs
(
args
)
pm
:=
commands
.
InitPackageManager
()
pm
:=
commands
.
InitPackageManager
WithoutBundles
()
for
_
,
platformRef
:=
range
platformsRefs
{
downloadPlatformByRef
(
pm
,
platformRef
)
...
...
commands/core/uninstall.go
View file @
daee3c68
...
...
@@ -44,7 +44,7 @@ func runUninstallCommand(cmd *cobra.Command, args []string) {
logrus
.
Info
(
"Executing `arduino core download`"
)
platformsRefs
:=
parsePlatformReferenceArgs
(
args
)
pm
:=
commands
.
InitPackageManager
()
pm
:=
commands
.
InitPackageManager
WithoutBundles
()
for
_
,
platformRef
:=
range
platformsRefs
{
uninstallPlatformByRef
(
pm
,
platformRef
)
...
...
commands/core/upgrade.go
View file @
daee3c68
...
...
@@ -46,7 +46,7 @@ func initUpgradeCommand() *cobra.Command {
func
runUpgradeCommand
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
logrus
.
Info
(
"Executing `arduino core upgrade`"
)
pm
:=
commands
.
InitPackageManager
()
pm
:=
commands
.
InitPackageManager
WithoutBundles
()
platformsRefs
:=
parsePlatformReferenceArgs
(
args
)
if
len
(
platformsRefs
)
==
0
{
...
...
configs/hardware_directories.go
View file @
daee3c68
...
...
@@ -36,8 +36,10 @@ func (config *Configuration) HardwareDirectories() (paths.PathList, error) {
res
.
Add
(
dir
)
}
if
dir
:=
config
.
SketchbookDir
.
Join
(
"hardware"
);
dir
.
IsDir
()
{
res
.
Add
(
dir
)
if
config
.
SketchbookDir
!=
nil
{
if
dir
:=
config
.
SketchbookDir
.
Join
(
"hardware"
);
dir
.
IsDir
()
{
res
.
Add
(
dir
)
}
}
return
res
,
nil
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment