Skip to content

Commit

Permalink
[host] Execute host program when using run command (esphome#6897)
Browse files Browse the repository at this point in the history
  • Loading branch information
jesserockz authored Jun 12, 2024
1 parent df52bc3 commit 1a242f9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions esphome/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,15 @@ def command_run(args, config):
if exit_code != 0:
return exit_code
_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(
default=args.device,
check_default=None,
Expand Down

0 comments on commit 1a242f9

Please sign in to comment.