From 5db70bea3c74520b12d8020946fe480a666e94e1 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Wed, 2 Jan 2019 14:02:59 +0100 Subject: [PATCH] Toggle Auto-Update Check With Environment Variable (#292) --- esphomeyaml/__main__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/esphomeyaml/__main__.py b/esphomeyaml/__main__.py index 30d7072de0..c7fb212341 100644 --- a/esphomeyaml/__main__.py +++ b/esphomeyaml/__main__.py @@ -151,9 +151,12 @@ def write_cpp(config): def compile_program(args, config): _LOGGER.info("Compiling app...") - thread = start_update_check_thread(esphomeyaml_storage_path(CORE.config_dir)) + 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) - thread.join() + if update_check: + thread.join() return rc