gnodet opened a new pull request, #22168:
URL: https://github.com/apache/camel/pull/22168
## Summary
- Add `EnvironmentHelper` utility class that detects environment
characteristics for CLI behavior:
- `NO_COLOR` environment variable (any value) disables ANSI colors per
https://no-color.org/
- `CI` environment variable disables colors and interactive prompts
- `FORCE_COLOR` environment variable forces colors even when not a TTY
- CI detection for GitHub Actions (`GITHUB_ACTIONS`), GitLab CI
(`GITLAB_CI`), and Jenkins (`JENKINS_URL`)
- Update `--logging-color` default in `Run.java` to auto-detect based on
environment instead of hardcoded `true`
- Add `--yes` / `-y` flag to `ExportBaseCommand` to skip confirmation prompts
- Add confirmation prompt before destructive `--clean-dir` operation in
export commands (ExportSpringBoot, ExportCamelMain, ExportQuarkus),
automatically confirmed in CI or non-interactive environments
## Test plan
- [x] `EnvironmentHelperTest` covers all detection methods
- [x] Existing tests pass (only pre-existing `CamelSendActionInfraTest` fhir
failure unrelated to changes)
- [ ] Manual: run `NO_COLOR=1 camel run ...` and verify no colored output
- [ ] Manual: run `camel export --clean-dir --directory /tmp/test` and
verify confirmation prompt appears
- [ ] Manual: run `camel export --clean-dir --yes --directory /tmp/test` and
verify no prompt
--
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]