Skip to content

Commit

Permalink
Test fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Mangel committed Aug 18, 2023
1 parent 1ac3407 commit b5a85fc
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/Fable.Cli/ProjectCracker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ type CacheInfo =
member this.Write() =
let path = CacheInfo.GetPath(this.FableModulesDir, this.FableOptions.DebugMode)

// Ensure the destination folders exists
if not (IO.File.Exists path) then
IO.Directory.CreateDirectory(IO.Path.GetDirectoryName path) |> ignore
// // Ensure the destination folders exists
// if not (IO.File.Exists path) then
// IO.Directory.CreateDirectory(IO.Path.GetDirectoryName path) |> ignore

Json.write path this

Expand Down Expand Up @@ -111,7 +111,8 @@ type CrackerOptions(cliArgs: CliArgs) =
|> CrackerOptions.GetFableModulesFromDir

if noCache then
IO.Directory.Delete(fableModulesDir, recursive=true)
if IO.Directory.Exists(fableModulesDir) then
IO.Directory.Delete(fableModulesDir, recursive=true)

if File.isDirectoryEmpty fableModulesDir then
IO.Directory.CreateDirectory(fableModulesDir) |> ignore
Expand Down Expand Up @@ -793,10 +794,10 @@ let getFullProjectOpts (opts: CrackerOptions) =
| None ->
let projRefs, mainProj = retryGetCrackedProjects opts

// The cache was considered outdated / invalid so it is better to make
// make sure we have are in a clean state
if IO.Directory.Exists(opts.FableModulesDir) then
IO.Directory.Delete(opts.FableModulesDir, true)
// // The cache was considered outdated / invalid so it is better to make
// // make sure we have are in a clean state
// if IO.Directory.Exists(opts.FableModulesDir) then
// IO.Directory.Delete(opts.FableModulesDir, true)

let fableLibDir, pkgRefs =
match opts.FableOptions.Language with
Expand Down

0 comments on commit b5a85fc

Please sign in to comment.