Skip to content

Commit

Permalink
Merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii committed Feb 5, 2023
2 parents 5ce9379 + 01eb3f9 commit 51a51d3
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/IKVM.Tools.Runner/Compiler/IkvmCompilerLauncher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,16 +250,17 @@ public async Task<int> ExecuteAsync(IkvmCompilerOptions options, CancellationTok
foreach (var i in options.Input)
w.WriteLine(i);

// path to the temporary response file
var response = options.ResponseFile;
// prepare path to response file
var response = string.IsNullOrWhiteSpace(options.ResponseFile) == false ? Path.GetFullPath(options.ResponseFile) : Path.GetTempFileName();

// to cancel the executable
var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken, new CancellationToken());

try
{
// create response file
response = string.IsNullOrWhiteSpace(response) == false ? Path.GetFullPath(response) : Path.GetTempFileName();
Directory.CreateDirectory(Path.GetDirectoryName(response));
File.WriteAllText(response, w.ToString());
File.WriteAllText(options.ResponseFile, w.ToString());

// locate EXE file
var exe = GetToolExe();
Expand Down

0 comments on commit 51a51d3

Please sign in to comment.