Skip to content

Commit b761f99

Browse files
committed
Ensure FSI-ASSEMBLY.dll path exists
fixes fsprojects#946 - relative paths seem to be confused between the path of the fake.exe and the path of the project. I'm happy for someone who knows more than I do to do a deeper dive, but this seems adequate for what I assume is a temporary location.
1 parent aff62a2 commit b761f99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/FakeLib/FSIHelper.fs

+6
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,12 @@ let internal runFAKEScriptWithFsiArgsAndRedirectMessages printDetails (FsiArgs(f
339339
let di = Directory.CreateDirectory cacheDir.FullName
340340
di.Attributes <- FileAttributes.Directory ||| FileAttributes.Hidden
341341

342+
let destinationFile = FileInfo(assemblyPath.Value)
343+
let targetDirectory = destinationFile.Directory
344+
345+
if (not <| targetDirectory.Exists) then targetDirectory.Create()
346+
if (destinationFile.Exists) then destinationFile.Delete()
347+
342348
File.Move("FSI-ASSEMBLY.dll", assemblyPath.Value)
343349

344350
if File.Exists("FSI-ASSEMBLY.pdb") then

0 commit comments

Comments
 (0)