Skip to content

Commit

Permalink
Merge pull request #2397 from pyrevitlabs/fix/2333
Browse files Browse the repository at this point in the history
Update ScriptConsole.cs
  • Loading branch information
jmcouffin authored Sep 10, 2024
2 parents 5fcc710 + 1fb9eb3 commit ca27f77
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 ca27f77

Please sign in to comment.