forked from platformio/platformio-core
Show a valid error when Internet is off-line while initializing a new project // Resolve #1784
This commit is contained in:
1 parent
69d01c4bc1
commit
6294580e25
3 files changed
+4
-1
No files matched your search
@@ -178,7 +178,7 @@ class InternetIsOffline(PlatformioException):
|
||||
MESSAGE = (
|
||||
"You are not connected to the Internet.\n"
|
||||
"If you build a project first time, we need Internet connection "
|
||||
"to install all dependencies and toolchain.")
|
||||
"to install all dependencies and toolchains.")
|
||||
|
||||
|
||||
class LibNotFound(PlatformioException):
|
||||
|
||||
@@ -414,6 +414,7 @@ class PkgInstallerMixin(object):
|
||||
click.secho("Looking for another mirror...", fg="yellow")
|
||||
|
||||
if versions is None:
|
||||
util.internet_on(raise_exception=True)
|
||||
raise exception.UnknownPackage(name)
|
||||
elif not pkgdata:
|
||||
raise exception.UndefinedPackageVersion(requirements or "latest",
|
||||
|
||||
Reference in new issue
Block a user