Skip to content

Commit

Permalink
Allow offline building - skip package updater if there is no connecti…
Browse files Browse the repository at this point in the history
…on (#1841)
  • Loading branch information
Niek authored and mcspr committed Aug 6, 2019
1 parent 437424a commit 274f71d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/extra_script_pre.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,12 @@ def get_shared_libdeps_dir(section, name):


def ensure_platform_updated():
if PIO_PLATFORM.are_outdated_packages():
print("updating platform packages", file=sys.stderr)
PIO_PLATFORM.update_packages()
try:
if PIO_PLATFORM.are_outdated_packages():
print("updating platform packages", file=sys.stderr)
PIO_PLATFORM.update_packages()
except Exception:
print("Warning: no connection, cannot check for outdated packages", file=sys.stderr)


# latest toolchain is still optional with PIO (TODO: recheck after 2.6.0!)
Expand Down

0 comments on commit 274f71d

Please sign in to comment.