mirror of
https://github.com/esphome/esphome.git
synced 2024-11-22 15:08:10 +01:00
[host] Execute host program when using run command (#6897)
This commit is contained in:
parent
be486e0ca6
commit
91e72fe121
1 changed files with 9 additions and 0 deletions
|
@ -488,6 +488,15 @@ def command_run(args, config):
|
||||||
if exit_code != 0:
|
if exit_code != 0:
|
||||||
return exit_code
|
return exit_code
|
||||||
_LOGGER.info("Successfully compiled program.")
|
_LOGGER.info("Successfully compiled program.")
|
||||||
|
if CORE.is_host:
|
||||||
|
from esphome.platformio_api import get_idedata
|
||||||
|
|
||||||
|
idedata = get_idedata(config)
|
||||||
|
if idedata is None:
|
||||||
|
return 1
|
||||||
|
program_path = idedata.raw["prog_path"]
|
||||||
|
return run_external_process(program_path)
|
||||||
|
|
||||||
port = choose_upload_log_host(
|
port = choose_upload_log_host(
|
||||||
default=args.device,
|
default=args.device,
|
||||||
check_default=None,
|
check_default=None,
|
||||||
|
|
Loading…
Reference in a new issue