guixiaowen commented on code in PR #1452:
URL: https://github.com/apache/auron/pull/1452#discussion_r2431011385
##########
auron-build.sh:
##########
@@ -298,7 +298,7 @@ mkdir -p "$(dirname "$BUILD_INFO_FILE")"
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | awk '{print $3}' | tr -d '"')
PROJECT_VERSION=$(xmllint --xpath
"/*[local-name()='project']/*[local-name()='properties']/*[local-name()='project.version']/text()"
pom.xml)
-RUST_VERSION=$(rustc --version | awk '{print $2}')
+RUST_VERSION=$(command -v rustc >/dev/null 2>&1 && rustc --version | awk
'{print $2}' || echo "")
Review Comment:
> If rustc is not installed then the right behavior should be to make it
fail, right? With this new change, we are silently running the build even if
the toolchain is not present which would result in the build failing later down
the line.
@ShreyeshArangath sh Thank you very much for reviewing the code. You’re
absolutely right — if the current build environment doesn’t have Rust
installed, it should indeed report an error or stop the build. The issue here
is that this part only retrieves the Rust version, and it merely prints a
message without stopping the compilation. So I’d like to optimize it so that
the actual error appears later during the build process, rather than showing a
warning here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]