diff --git a/src/sonic-build-hooks/scripts/buildinfo_base.sh b/src/sonic-build-hooks/scripts/buildinfo_base.sh index 90609127eba1..a11ae178c040 100755 --- a/src/sonic-build-hooks/scripts/buildinfo_base.sh +++ b/src/sonic-build-hooks/scripts/buildinfo_base.sh @@ -208,6 +208,11 @@ run_pip_command() $REAL_COMMAND "${parameters[@]}" local result=$? + if [ "$result" != 0 ]; then + echo "Failed to run the command with constraint, try to install with the original command" 1>&2 + $REAL_COMMAND "$@" + result=$? + fi rm $tmp_version_file return $result }