Skip to content

Commit 47b7c1d

Browse files
ericstjvitek-karas
andauthored
Remove duplicate entries from dotnet --info (#60376) (#60496)
* Remove duplicate entries from dotnet --info * Remove trailing slashes from globally registered locations as well * PR feedback * Tests not ported due to missing infrastructure Co-authored-by: vitek-karas <vitek.karas@microsoft.com> Co-authored-by: vitek-karas <vitek.karas@microsoft.com>
1 parent d1a6945 commit 47b7c1d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/installer/corehost/cli/hostmisc/pal.windows.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,14 @@ bool pal::get_global_dotnet_dirs(std::vector<pal::string_t>* dirs)
407407
bool dir_found = false;
408408
if (pal::get_dotnet_self_registered_dir(&custom_dir))
409409
{
410+
remove_trailing_dir_seperator(&custom_dir);
410411
dirs->push_back(custom_dir);
411412
dir_found = true;
412413
}
413414
if (get_default_installation_dir(&default_dir))
414415
{
416+
remove_trailing_dir_seperator(&default_dir);
417+
415418
// Avoid duplicate global dirs.
416419
if (!dir_found || !are_paths_equal_with_normalized_casing(custom_dir, default_dir))
417420
{

0 commit comments

Comments
 (0)