Skip to content

Commit

Permalink
Close input stream after writing json.
Browse files Browse the repository at this point in the history
  • Loading branch information
allisterb committed Nov 24, 2024
1 parent 21b8844 commit 2fcaf96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Stratis.VS.SolidityProjectBuildTasks/CompileContracts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public override bool Execute()
UseShellExecute = false,
WorkingDirectory = ProjectDir,
CreateNoWindow = true,
RedirectStandardOutput = false,
RedirectStandardOutput = true,
RedirectStandardInput = true,
RedirectStandardError = false,
};
Expand All @@ -54,7 +54,8 @@ public override bool Execute()
}
var ser = new Newtonsoft.Json.JsonSerializer();
ser.Serialize(p.StandardInput, i);
p.StandardInput.Write(Environment.NewLine);
p.StandardInput.WriteLine(Environment.NewLine);
p.StandardInput.Close();
Log.LogMessage(MessageImportance.High, p.StandardOutput.ReadToEnd());
return false;
}
Expand Down

0 comments on commit 2fcaf96

Please sign in to comment.