Toggle Auto-Update Check With Environment Variable (#292)

This commit is contained in:
Otto Winter 2019-01-02 14:02:59 +01:00 committed by GitHub
parent 00ff99cc7d
commit 5db70bea3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,8 +151,11 @@ def write_cpp(config):
def compile_program(args, config):
_LOGGER.info("Compiling app...")
update_check = not os.getenv('ESPHOMEYAML_NO_UPDATE_CHECK', False)
if update_check:
thread = start_update_check_thread(esphomeyaml_storage_path(CORE.config_dir))
rc = platformio_api.run_compile(config, args.verbose)
if update_check:
thread.join()
return rc