Skip to content

Commit 5203c39

Browse files
Update tools/wled-tools
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent bc099ba commit 5203c39

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/wled-tools

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ update_one() {
135135
local url="http://$address:$port/update"
136136
local curl_command="curl -s -X POST -F "file=@$firmware" "$url""
137137

138-
curl_handler "$curl_command" "$hostname"
138+
if ! curl_handler "$curl_command" "$hostname"; then
139+
log "ERROR" "$RED" "Failed to update firmware for $hostname"
140+
return 1
141+
fi
142+
143+
log "INFO" "$GREEN" "Successfully initiated firmware update for $hostname"
144+
return 0
139145
}
140146

141147
# Command-line arguments processing

0 commit comments

Comments
 (0)