Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 5714f72

Browse files
authored
Remove duplicate entries from dotnet --info (#9186)
1 parent 9ab9a9b commit 5714f72

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/corehost/common/pal.windows.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,11 +356,14 @@ bool pal::get_global_dotnet_dirs(std::vector<pal::string_t>* dirs)
356356
bool dir_found = false;
357357
if (pal::get_dotnet_self_registered_dir(&custom_dir))
358358
{
359+
remove_trailing_dir_seperator(&custom_dir);
359360
dirs->push_back(custom_dir);
360361
dir_found = true;
361362
}
362363
if (get_default_installation_dir(&default_dir))
363364
{
365+
remove_trailing_dir_seperator(&default_dir);
366+
364367
// Avoid duplicate global dirs.
365368
if (!dir_found || !are_paths_equal_with_normalized_casing(custom_dir, default_dir))
366369
{

0 commit comments

Comments
 (0)