Commit 1e825c01 authored by Cristian Maglie's avatar Cristian Maglie

Fixed nil pointer if lib already downloaded

parent 59cc7b71
...@@ -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)
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment