Skip to content

Commit 6255d54

Browse files
committed
Delete pdbs
1 parent d9898cc commit 6255d54

File tree

1 file changed

+14
-0
lines changed
  • src/Compiler/Interactive

1 file changed

+14
-0
lines changed

src/Compiler/Interactive/fsi.fs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1342,6 +1342,20 @@ let scriptingDirectory =
13421342

13431343
createDirectory (Path.Combine(Path.GetTempPath(), $"{DateTime.Now:s}-{Guid.NewGuid():n}".Replace(':', '-')))
13441344

1345+
let deleteScripts () =
1346+
try
1347+
#if !DEBUG
1348+
if scriptingDirectory.IsValueCreated then
1349+
if Directory.Exists(scriptingDirectory.Value) then
1350+
Directory.Delete(scriptingDirectory.Value, true)
1351+
#else
1352+
()
1353+
#endif
1354+
with _ ->
1355+
()
1356+
1357+
do AppDomain.CurrentDomain.ProcessExit |> Event.add (fun _ -> deleteScripts ())
1358+
13451359

13461360

13471361
let dynamicCcuName = "FSI-ASSEMBLY"

0 commit comments

Comments
 (0)