Skip to content

Conversation

corbob
Copy link
Member

@corbob corbob commented Sep 17, 2025

Description Of Changes

Update the lookup of a source when the source was requested as . and working directory is the root of a drive.

Motivation and Context

When a source is specified as . and we're at the root of the drive, sometimes we get the path as c: which when treated as a repository source does not resolve correctly.

Testing

  • Run through Test Kitchen here
  • Run the tests from this PR against the develop branch CLI through Test Kitchen here

Operating Systems Testing

  • Windows 11 - Manual testing
  • Windows Server 2016 - Test Kitchen
  • Windows Server 2019 - Test Kitchen

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v3 compatibility checked?

Related Issue

@corbob corbob self-assigned this Sep 17, 2025
@corbob corbob force-pushed the 3641-fix-drive-root-sources branch 3 times, most recently from 1d62d32 to 9345924 Compare September 17, 2025 18:28
@corbob corbob marked this pull request as ready for review September 17, 2025 18:32
@corbob corbob requested a review from vexx32 September 22, 2025 17:34
This commit adds tests to ensure a source of '.' at the root of a drive
resolves correctly.
@corbob corbob force-pushed the 3641-fix-drive-root-sources branch from 9345924 to 54f2f0a Compare September 22, 2025 19:12
With the implementation of appending a directory separator to the source
when it doesn't already end in one, this caused the comparison of a test
to failure. This commit updates that expectation to include the trailing
directory separator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot use the source . when running from the root of a drive

2 participants