[Bug] Default configuration is used when config file specified via -config not found
See original GitHub issueDescribe the bug
When invalid file name passed to the -config
switch (missing file, etc…) no error message is shown and GitVersion silently assumes default configuration.
Expected Behavior
If -config
switch is used and specified file not found an error message should be shown.
Actual Behavior
GitVersion silently assumes default configuration. This breaks the principle of least astonishment and makes it hard to debug issues with configuration, especially in CI.
Steps to Reproduce
The GitVersion will generate version using default configuration if the specified config file doesn’t exist.
mkdir ./repro
cd ./repro
git init
dotnet tool install --global GitVersion.Tool
dotnet-gitversion -config foobar.xyz
Your Environment
- Operating System and version:
Windows 10
- GitVesion:
5.7.0+Branch.main.Sha.8d177c6d666c8eeb1c6a6a2c71fd4b78741137d2
I think similar issue related to config file handling was raised already, but unfortunely I can’t find it, since config
+ everything that I was able to come up with are too generic terms for GitHub issue search.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Getting pylint warning: "No config file found, using default ...
You will get the " No config file found, using default configuration " warning if you do not have a .pylintrc file in...
Read more >Could not find required config file: /etc/mock/default.cfg
A default configuration file is specified in /etc/mock/default.cfg, which is usually a symlink to one of the installed configurations. ... cut ... OPTIONS...
Read more >Settings (.yarnrc.yml)
The default configuration will compare against master, origin/master, ... JavaScript constraints will always be read from the `yarn.config.js` file.
Read more >Configuration Files - ESLint - Pluggable JavaScript Linter
The first way to use configuration files is via .eslintrc.* and package.json files. ... files, make sure to use --no-eslintrc along with the...
Read more >Is there a way for one SSH config file to include another one?
Starting with ssh 7.3 (released on August 1st, 2016), an Include directive is available. Include: Include the specified configuration file(s).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure, but we are also trying to close down the development of v5 to focus on v6. So unless it’s very important, such as a security fix or similar, we would prefer to target everything for v6 from now on.
🎉 This issue has been resolved in version 6.0.0-beta.1 🎉 The release is available on:
Your GitReleaseManager bot 📦🚀