Skip to content

Conversation

@pianomanjh
Copy link
Contributor

@pianomanjh pianomanjh commented Sep 12, 2019

When specifying a named configuration, and the working directory and repository root are the same, do not throw a warning.

For example, my repo root is
c:\projects\repo
My named config is at c:\projects\repo\myConfig.yml
When running this command, from the repo root:
dotnet gitversion /config myConfig.yml
A warning is thrown, and versioning fails.

Additionally, the TestFileSystem abstraction was broken, causing one of my tests to erroneously pass. This is due to:
a) it isn't case insensitive
b) doesn't resolve/nomalize pathing constructs

I've only updated the GitVersionCore.Tests copy. Let me know if you'd like me to fix the other copies of this. Ultimately, it would be better to go with a well-supported library for this, like System.IO.Abstractions

Fixes #1808.

@pianomanjh pianomanjh force-pushed the bugfix/1808/named-config-exception branch from a1017bb to e263a31 Compare September 12, 2019 20:38
@asbjornu asbjornu changed the title Fixes #1808, working/repo directories with named configuration throw warning Working/repo directories with named configuration throw warning Oct 18, 2019
@pianomanjh pianomanjh force-pushed the bugfix/1808/named-config-exception branch 3 times, most recently from 0d8e16d to 26beb85 Compare December 16, 2019 04:31
@asbjornu
Copy link
Member

asbjornu commented Jan 3, 2020

Sorry for not merging this earlier, @pianomanjh. Can you please take a look at why the build is failing and perhaps performing a rebase to get rid of my merge commits 855ec8c and 0702712?

pianomanjh and others added 4 commits January 3, 2020 07:23
…sitory root are the same, do not throw a warning
…tive subdirectory of repo root, and working is repo root
…leSystem behavior as:

a) it isn't case insensitive
b) doesn't resolve/nomalize pathing constructs
This caused the test in the previous test to erroneously pass
@pianomanjh pianomanjh force-pushed the bugfix/1808/named-config-exception branch from 0702712 to e2fc1c4 Compare January 3, 2020 15:26
@asbjornu asbjornu merged commit 7101838 into GitTools:master Jan 6, 2020
@asbjornu
Copy link
Member

asbjornu commented Jan 6, 2020

Thank you for your contributions, @pianomanjh! 🙏

@arturcic arturcic added this to the 5.1.4 milestone Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dotnet Tool: Named Config file throws warning if Working and Repo root directories are the same

3 participants