From ecc1b1dc4c29bb3417f494366a68111d11109fca Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Mon, 26 Aug 2024 19:06:21 -0600 Subject: [PATCH] check 0 idf version first --- src/nesper/consts.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nesper/consts.nim b/src/nesper/consts.nim index df96063..28e9ce4 100644 --- a/src/nesper/consts.nim +++ b/src/nesper/consts.nim @@ -38,11 +38,11 @@ const template ESP_IDF_VERSION_STR*: string = $ESP_IDF_MAJOR & "." & $ESP_IDF_MINOR & "." & $ESP_IDF_PATCH static: - if ESP_IDF_MAJOR notin [4, 5]: - error("Incorrect esp-idf major version: " & $ESP_IDF_MAJOR) if ESP_IDF_VERSION == ESP_IDF_VERSION_VAL(0, 0, 0): warning("ESP_IDF_VERSION: " & ESP_IDF_VERSION_STR) error("Must set esp-idf version using `-d:ESP_IDF_VERSION=4.4` or using an environment variable `export ESP_IDF_VERSION=4.4`") + if ESP_IDF_MAJOR notin [4, 5]: + error("Incorrect esp-idf major version: " & $ESP_IDF_MAJOR) ## Definitions for error constants.