coder999o opened a new pull request, #7352: URL: https://github.com/apache/rocketmq-dashboard/pull/7352
## What is the purpose of the change Fixes #7351. `make clean` currently expands `BUILD_DIR` as shell words and patterns. For example, `BUILD_DIR='build output'` deletes the unrelated `build` and `output` directories while leaving `build output` intact. The default path has the same problem when the checkout directory contains a space. ## Brief changelog - Quote the cleanup operand and terminate rm option parsing, so spaces, wildcard characters and a leading dash remain part of the selected directory name. - Execute the real Makefile in isolated temporary directories to verify the default path, explicit paths and preservation of unrelated marker files. - Cover ordinary and empty-directory overrides as controls. The production change is one recipe line. This fixes cleanup path selection; the other build/package recipes have their own path-handling limitations. ## Verifying this change Using Go 1.27.1, GNU Make 3.81 and BSD rm on macOS: - Before the fix, the default spaced checkout, explicit spaced path, wildcard path and leading-dash path all failed the executable regression. The ordinary-path control passed. - `cd rmqctl && go test -race -count=1 ./...` — passed across all CLI packages; 121 top-level tests passed in seven tested packages, with two additional packages containing no tests. All six cleanup scenarios passed. - `cd rmqctl && go vet ./...` — passed. - `cd rmqctl && go run ./internal/catalog/generate -input-dir ../server/src/main/resources/tool-catalog/tools -output internal/catalog/catalog_gen.go -check` — passed. - `cd rmqctl && gofmt -l .` — no output. - `git diff --check` — passed. All deletion fixtures stayed inside Go temporary directories. Linux execution and native Windows behavior were not verified locally. -- 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]
