diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bde83f5cbda..beaf8545183 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,6 @@ +#### 2.14.13 - 24.04.2014 +* Handle problems with ProgramFilesX86 on mono - https://github.com/tpetricek/FsLab/pull/32 + #### 2.14.12 - 24.04.2014 * Change the MSBuild 12.0 path settings according to https://github.com/tpetricek/FsLab/pull/32 diff --git a/src/app/FakeLib/EnvironmentHelper.fs b/src/app/FakeLib/EnvironmentHelper.fs index 7ffd0ed21c3..be7a23aca15 100644 --- a/src/app/FakeLib/EnvironmentHelper.fs +++ b/src/app/FakeLib/EnvironmentHelper.fs @@ -65,11 +65,14 @@ let ProgramFiles = Environment.GetFolderPath Environment.SpecialFolder.ProgramFi /// It seems this covers all cases where PROCESSOR\_ARCHITECTURE may misreport and the case where the other variable /// PROCESSOR\_ARCHITEW6432 can be null let ProgramFilesX86 = - let wow64 = (environVar "PROCESSOR_ARCHITEW6432") - let globalArch = (environVar "PROCESSOR_ARCHITECTURE") + let wow64 = environVar "PROCESSOR_ARCHITEW6432" + let globalArch = environVar "PROCESSOR_ARCHITECTURE" match wow64, globalArch with - | "AMD64", "AMD64" | null, "AMD64" | "x86", "AMD64" -> environVar "ProgramFiles(x86)" + | "AMD64", "AMD64" + | null, "AMD64" + | "x86", "AMD64" -> environVar "ProgramFiles(x86)" | _ -> environVar "ProgramFiles" + |> fun detected -> if detected = null then @"C:\Program Files (x86)\" else detected /// The system root environment variable. Typically "C:\Windows" let SystemRoot = environVar "SystemRoot"