Skip to content

[Bug] Invalid path passed to /config via cmd line is ignored without error #3688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jwittner opened this issue Sep 13, 2023 · 3 comments · Fixed by #3408
Closed

[Bug] Invalid path passed to /config via cmd line is ignored without error #3688

jwittner opened this issue Sep 13, 2023 · 3 comments · Fixed by #3408
Labels

Comments

@jwittner
Copy link

Describe the bug
Run the command line tool and pass /config with a path to a non-existent file. Observe that version json results are produced and no error is reported.

dotnet tool run dotnet-gitversion /config .\GitVersion-ACS.yaml 

Expected Behavior

No results and an invalid path should result in an error in the tool indicating that the config cannot be used.

Actual Behavior

Version json results are produced and no error is reported.

Possible Fix

The path must be getting validated - this should cause an error to manifest.

Steps to Reproduce

See above commands

Context

I thought the tooling was setup and working, but it had the wrong version path. Had to spend time debugging instead of have a clear indicator on what I did wrong.

Your Environment

  • Version Used: 5.12.0
  • Operating System and version (Windows 10, Ubuntu 18.04):
    • Windows 11
    • PowerShell 7.x
    • DotNet 6
@jwittner jwittner added the bug label Sep 13, 2023
@HHobeck HHobeck added this to the 7.x milestone Sep 29, 2023
@HHobeck
Copy link
Contributor

HHobeck commented Sep 29, 2023

Pull requests are welcome!!

Edit: Keep in mind that the main branch reflects the latest development stage.

@JonAnders
Copy link

Looks like this might have been fixed in e0c882d, currently included in the v6 betas.

@asbjornu
Copy link
Member

asbjornu commented Dec 11, 2023

Thanks, @JonAnders – it looks like you're right! This was fixed in #3408. Closing.

@asbjornu asbjornu linked a pull request Dec 11, 2023 that will close this issue
@asbjornu asbjornu removed a link to a pull request Dec 11, 2023
@asbjornu asbjornu linked a pull request Dec 11, 2023 that will close this issue
@arturcic arturcic removed this from the 7.x milestone Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants