question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Default configuration is used when config file specified via -config not found

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
asbjornucommented, Jan 16, 2023

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.

0reactions
arturciccommented, Mar 2, 2023

🎉 This issue has been resolved in version 6.0.0-beta.1 🎉 The release is available on:

Your GitReleaseManager bot 📦🚀

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found