Skip to content

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

@jwittner

Description

@jwittner

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions