Skip to content

Commit 1caaa43

Browse files
committed
Fix
1 parent 295a6c3 commit 1caaa43

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/scripts/install-platformio-esp32.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ function build_pio_sketches(){ # build_pio_sketches <board> <options> <examples-
149149
continue
150150
fi
151151

152-
if ! ${CHECK_REQUIREMENTS} $sketchdir "$SDKCONFIG_DIR/esp32/sdkconfig"; then
152+
if [ $(${CHECK_REQUIREMENTS} $sketchdir "$SDKCONFIG_DIR/esp32/sdkconfig") -eq 0 ]; then
153153
continue
154154
fi
155155
fi

.github/scripts/sketch_utils.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ check_requirements(){ # check_requirements <sketchdir> <sdkconfig_path>
1919
requirement=$(echo $requirement | xargs)
2020
found_line=$(grep -E "^$requirement" "$sdkconfig_path")
2121
if [[ "$found_line" == "" ]]; then
22-
return 0
22+
echo 0
2323
fi
2424
done
2525
fi
@@ -37,11 +37,11 @@ check_requirements(){ # check_requirements <sketchdir> <sdkconfig_path>
3737
fi
3838
done
3939
if [[ "$found" == "false" ]]; then
40-
return 0
40+
echo 0
4141
fi
4242
fi
4343

44-
return 1
44+
echo 1
4545
}
4646

4747
function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [extra-options]
@@ -207,7 +207,7 @@ function build_sketch(){ # build_sketch <ide_path> <user_path> <path-to-ino> [ex
207207
exit 0
208208
fi
209209

210-
if ! check_requirements "$sketchdir" "$SDKCONFIG_DIR/$target/sdkconfig"; then
210+
if [ $(check_requirements "$sketchdir" "$SDKCONFIG_DIR/$target/sdkconfig") -eq 0 ]; then
211211
echo "Target $target does not meet the requirements for $sketchname. Skipping."
212212
exit 0
213213
fi
@@ -358,7 +358,7 @@ function count_sketches(){ # count_sketches <path> [target] [file] [ignore-requi
358358
fi
359359

360360
if [ "$ignore_requirements" != "1" ]; then
361-
if ! check_requirements "$sketchdir" "$SDKCONFIG_DIR/$target/sdkconfig"; then
361+
if [ $(check_requirements "$sketchdir" "$SDKCONFIG_DIR/$target/sdkconfig") -eq 0 ]; then
362362
continue
363363
fi
364364
fi

.github/scripts/tests_run.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function run_test() {
3737
return 0
3838
fi
3939

40-
if ! ${CHECK_REQUIREMENTS} $sketchdir $sdkconfig_path; then
40+
if [ $(${CHECK_REQUIREMENTS} $sketchdir $sdkconfig_path) -eq 0 ] ; then
4141
printf "\033[93mTarget $target does not meet the requirements for $sketchname. Skipping.\033[0m\n"
4242
printf "\n\n\n"
4343
return 0

0 commit comments

Comments
 (0)