Skip to content

Commit 4d6c60b

Browse files
committed
arduino-cli: Error out if OTA_IP cannot be deduced from DNS
1 parent 7ce6559 commit 4d6c60b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/arduino-cli.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ upload:
7575

7676
.PHONY: ota
7777
ota:
78-
@echo $(ARDUINO_CLI) upload $(VERBOSE) -b $(BOARD_FQDN) -p $(OTA_IP) --upload-field "password=<hidden>" --input-dir $(BUILD_PATH)
78+
@echo $(ARDUINO_CLI) upload $(VERBOSE) -b $(BOARD_FQDN) -p $(if $(OTA_IP),$(OTA_IP),$(error missing OTA_IP)) --upload-field "password=<hidden>" --input-dir $(BUILD_PATH)
7979
@$(ARDUINO_CLI) upload $(VERBOSE) -b $(BOARD_FQDN) -p $(OTA_IP) --upload-field "password=$(OTA_PASSWORD)" --input-dir $(BUILD_PATH)
8080

8181
.PHONY: monitor

0 commit comments

Comments
 (0)