Skip to content

Commit

Permalink
fix(ds-identify): Return code 2 is a valid result, use cached value
Browse files Browse the repository at this point in the history
Commit de5fc36 added a new return code (2) for indicating disabled status.
Without this change, ds-identify will re-run when it shouldn't, and users will
see a bogus log message:

    previous run returned unexpected '$ret'. Re-running.
  • Loading branch information
holmanb authored and blackboxsw committed Jan 4, 2024
1 parent cb36bf3 commit 0f3afb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/ds-identify
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@ main() {
if [ "${1:+$1}" != "--force" ] && [ -f "$PATH_RUN_CI_CFG" ] &&
[ -f "$PATH_RUN_DI_RESULT" ]; then
if read ret < "$PATH_RUN_DI_RESULT"; then
if [ "$ret" = "0" ] || [ "$ret" = "1" ]; then
if [ "$ret" = "0" ] || [ "$ret" = "1" ] || [ "$ret" = "2" ]; then
debug 2 "used cached result $ret. pass --force to re-run."
return "$ret";
fi
Expand Down

0 comments on commit 0f3afb4

Please sign in to comment.