diff --git a/src/installer/corehost/cli/hostmisc/pal.windows.cpp b/src/installer/corehost/cli/hostmisc/pal.windows.cpp index 951700d85a685..666b31b4c9531 100644 --- a/src/installer/corehost/cli/hostmisc/pal.windows.cpp +++ b/src/installer/corehost/cli/hostmisc/pal.windows.cpp @@ -407,11 +407,14 @@ bool pal::get_global_dotnet_dirs(std::vector* dirs) bool dir_found = false; if (pal::get_dotnet_self_registered_dir(&custom_dir)) { + remove_trailing_dir_seperator(&custom_dir); dirs->push_back(custom_dir); dir_found = true; } if (get_default_installation_dir(&default_dir)) { + remove_trailing_dir_seperator(&default_dir); + // Avoid duplicate global dirs. if (!dir_found || !are_paths_equal_with_normalized_casing(custom_dir, default_dir)) { diff --git a/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml b/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml index 74f140436a8fc..611da4515df68 100644 --- a/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml +++ b/src/installer/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml @@ -43,14 +43,18 @@ var machine = system.sysctl("hw.machine"); var cputype = system.sysctl("hw.cputype"); var cpu64 = system.sysctl("hw.cpu64bit_capable"); + var translated = system.sysctl("sysctl.proc_translated"); system.log("Machine type: " + machine); system.log("Cpu type: " + cputype); system.log("64-bit: " + cpu64); + system.log("Translated: " + translated); // From machine.h // CPU_TYPE_X86_64 = CPU_TYPE_X86 | CPU_ARCH_ABI64 = 0x010000007 = 16777223 // CPU_TYPE_X86 = 7 var result = machine == "amd64" || machine == "x86_64" || cputype == "16777223" || (cputype == "7" && cpu64 == "1"); + // We may be running under translation (Rosetta) that makes it seem like system is x64, if so assume machine is not actually x64 + result = result && (translated != "1"); system.log("IsX64Machine: " + result); return result; }]]>