Copilot commented on code in PR #1106:
URL: https://github.com/apache/iceberg-cpp/pull/1106#discussion_r4523105099


##########
ci/scripts/build_example.sh:
##########
@@ -82,8 +82,17 @@ if [[ -z "${source_dir}" || -z "${build_type}" || -z 
"${cxx_standard}" ]]; then
     exit 2
 fi
 
+case "${cxx_standard}" in
+    *[!0-9]*)
+        echo "--cxx-standard must be numeric, got '${cxx_standard}'" >&2
+        exit 2
+        ;;
+esac

Review Comment:
   The numeric validation relies on an earlier non-empty check; as written, an 
empty string would pass this `case` block. To make this validation 
self-contained (and safer against future refactors), include an explicit 
empty-pattern arm (e.g., `''|*[!0-9]*`) so the numeric guard is complete on its 
own.



##########
ci/scripts/build_example.sh:
##########
@@ -82,8 +82,17 @@ if [[ -z "${source_dir}" || -z "${build_type}" || -z 
"${cxx_standard}" ]]; then
     exit 2
 fi
 
+case "${cxx_standard}" in
+    *[!0-9]*)
+        echo "--cxx-standard must be numeric, got '${cxx_standard}'" >&2
+        exit 2
+        ;;
+esac
+
 set -x
-build_dir=${source_dir}/build
+# Keep successive C++ standard builds separate while Windows may still hold 
binaries.
+build_dir=${source_dir}/build/cxx${cxx_standard}
+mkdir -p "${source_dir}/build"

Review Comment:
   The directory being created is indirectly related to `build_dir` (it’s the 
parent), which can drift if `build_dir` changes again. Consider deriving the 
created directory from `build_dir` itself (create `$(dirname "$build_dir")` or 
equivalent) so the relationship stays correct and future edits don’t 
accidentally create the wrong path.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to