Skip to content

Commit

Permalink
Remove global.json version check on dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
mclark1129 committed Apr 21, 2022
1 parent 4a2a87a commit aef36f0
Show file tree
Hide file tree
Showing 2 changed files with 588 additions and 11 deletions.
6 changes: 2 additions & 4 deletions src/app/Fake.DotNet.Cli/DotNet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -661,10 +661,8 @@ module DotNet =
// make sure to write global.json if we did not read the version from it
// We need to do this as the SDK will use this file to select the actual version
// See https://github.com/fsharp/FAKE/pull/1963 and related discussions
if File.Exists globalJsonPath then
let readVersion = getSDKVersionFromGlobalJsonDir workDir
if readVersion <> version then failwithf "Existing global.json with a different version found!"
false
if File.Exists globalJsonPath
then false
else
let template = sprintf """{ "sdk": { "version": "%s" } }""" version
File.WriteAllText(globalJsonPath, template)
Expand Down
Loading

0 comments on commit aef36f0

Please sign in to comment.