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
1e825c01
Commit
1e825c01
authored
Oct 25, 2018
by
Cristian Maglie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed nil pointer if lib already downloaded
parent
59cc7b71
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
commands/lib/download.go
commands/lib/download.go
+8
-4
No files found.
commands/lib/download.go
View file @
1e825c01
...
@@ -77,10 +77,14 @@ func downloadLibraries(lm *librariesmanager.LibrariesManager, libReleases []*lib
...
@@ -77,10 +77,14 @@ func downloadLibraries(lm *librariesmanager.LibrariesManager, libReleases []*lib
formatter
.
PrintError
(
err
,
"Error downloading "
+
libRelease
.
String
())
formatter
.
PrintError
(
err
,
"Error downloading "
+
libRelease
.
String
())
os
.
Exit
(
commands
.
ErrNetwork
)
os
.
Exit
(
commands
.
ErrNetwork
)
}
}
formatter
.
DownloadProgressBar
(
d
,
libRelease
.
String
())
if
d
==
nil
{
if
d
.
Error
()
!=
nil
{
formatter
.
Print
(
libRelease
.
String
()
+
" already downloaded"
)
formatter
.
PrintError
(
d
.
Error
(),
"Error downloading "
+
libRelease
.
String
())
}
else
{
os
.
Exit
(
commands
.
ErrNetwork
)
formatter
.
DownloadProgressBar
(
d
,
libRelease
.
String
())
if
d
.
Error
()
!=
nil
{
formatter
.
PrintError
(
d
.
Error
(),
"Error downloading "
+
libRelease
.
String
())
os
.
Exit
(
commands
.
ErrNetwork
)
}
}
}
}
}
...
...
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