adoroszlai commented on code in PR #7622:
URL: https://github.com/apache/ozone/pull/7622#discussion_r1898873593
##########
hadoop-ozone/dist/src/main/compose/test-all.sh:
##########
@@ -23,7 +23,7 @@ SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )"
>/dev/null && pwd )
ALL_RESULT_DIR="$SCRIPT_DIR/result"
PROJECT_DIR="$SCRIPT_DIR/.."
mkdir -p "$ALL_RESULT_DIR"
-rm "$ALL_RESULT_DIR"/* || true
+rm -rf "${ALL_RESULT_DIR:?}"/* || true
Review Comment:
We can simplify this by swapping `rm` and `mkdir`:
```suggestion
rm -fr "${ALL_RESULT_DIR}"
mkdir -p "${ALL_RESULT_DIR}"
```
`:?` is not needed, since `ALL_RESULT_DIR` is defined in line 23.
--
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]