Skip to content

GH197: Take Cake.Sdk verbosity from configuration, command line wins - #198

Merged
devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-197
Sep 14, 2026
Merged

devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-197

Conversation

@devlead

@devlead devlead commented Sep 14, 2026

Copy link
Copy Markdown
Member
  • Make CakeAppSettings.Verbosity nullable and drop [DefaultValue(Verbosity.Normal)], so an omitted --verbosity is distinguishable from an explicit --verbosity normal
  • Resolve the effective verbosity through ICakeConfiguration.GetVerbosity, giving command line first, then configuration, then Normal, matching Cake.Tool and Frosting
  • Apply the command line verbosity before setting the working directory, so failures while setting it are still logged at the requested level
  • Build ICakeConfiguration from ICakeEnvironment.WorkingDirectory rather than Environment.CurrentDirectory, so --working decides where cake.config is read from for every file based setting, not just verbosity
  • Update the generated code snapshots across all generator scenarios
  • Add an IntegrationTest-Verbosity step covering the precedence chain end to end: CAKE_SETTINGS_VERBOSITY alone, command line overriding it in both directions, and a cake.config inside versus outside the working directory
  • fixes Add support for verbosity via configuration #197

…d line wins

- Make `CakeAppSettings.Verbosity` nullable and drop `[DefaultValue(Verbosity.Normal)]`, so
  an omitted `--verbosity` is distinguishable from an explicit `--verbosity normal`
- Resolve the effective verbosity through `ICakeConfiguration.GetVerbosity`, giving command
  line first, then configuration, then `Normal`, matching Cake.Tool and Frosting
- Apply the command line verbosity before setting the working directory, so failures while
  setting it are still logged at the requested level
- Build `ICakeConfiguration` from `ICakeEnvironment.WorkingDirectory` rather than
  `Environment.CurrentDirectory`, so `--working` decides where `cake.config` is read from
  for every file based setting, not just verbosity
- Update the generated code snapshots across all generator scenarios
- Add an `IntegrationTest-Verbosity` step covering the precedence chain end to end:
  `CAKE_SETTINGS_VERBOSITY` alone, command line overriding it in both directions, and a
  `cake.config` inside versus outside the working directory
- fixes cake-build#197
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for verbosity via configuration

1 participant