Skip to content

Commit

Permalink
Update ScriptConsole.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcouffin authored Sep 10, 2024
1 parent cae17c1 commit 1fb9eb3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion dev/pyRevitLabs.PyRevit.Runtime/ScriptConsole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,10 @@ private void Save_Contents_Button_Clicked(object sender, RoutedEventArgs e)
}
try
{
using (File.CreateText(saveDlg.FileName).Write(GetFullHtml())) { }
using (StreamWriter writer = File.CreateText(saveDlg.FileName))
{
writer.Write(GetFullHtml());
}
}
catch (Exception ex)
{
Expand Down

0 comments on commit 1fb9eb3

Please sign in to comment.