-
Notifications
You must be signed in to change notification settings - Fork 664
Closed
Description
Prerequisites
- I have written a descriptive issue title
- I have searched issues to ensure it has not already been reported
GitVersion package
GitVersion.Tool
GitVersion version
6.5.0
Operating system
N/A
What are you seeing?
order of the /diag switch matters:
- it is only respected if it is last argument in cmd line
- insult to injury: the directly following argument is silently swallowed
Observation was motivated by the discussion in #4539; but different from that issue's observation that it is a regression since 6.3.0, this /diag "swallowing" has been around for 6.x and 5.x versions (and likely longer?).
This bug is also the deeper cause of #4395
What is expected?
Order of /diag within command line arguments should not matter and a legal argument following /diag should not be swallowed
Steps to Reproduce
But right now, only 1) works as expected:
dotnet gitversion -l console -diag-> works: emits diag info, followed by JSON version infodotnet gitversion -diag -l console-> no diag info to console; only JSON version info in stdoutdotnet gitversion -diag -l logfile.log-> log file is not created, so no diag info; but JSON version info in stdout
RepositoryFixture Test
see also separate commit with added tests in my soon to be published PR