Skip to content

Commit

Permalink
Fixed Python compile path
Browse files Browse the repository at this point in the history
  • Loading branch information
Relfos committed Apr 1, 2018
1 parent cdcf0b6 commit 8d3dbda
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions NEO-Debugger-Core/Utils/Compiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ public bool CompileContract(string sourceCode, string outputFilePath, SourceLang
{
case SourceLanguage.CSharp:
{
info.FileName = "neon.exe";
var file = Path.Combine(info.WorkingDirectory, "neon.exe");
if (!File.Exists(file))
throw new FileNotFoundException("File not found", file);

info.FileName = file;
info.Arguments = "\"" + outputFilePath + "\"";
break;
}
Expand All @@ -74,11 +78,6 @@ public bool CompileContract(string sourceCode, string outputFilePath, SourceLang

info.WorkingDirectory = _settings.compilerPaths[language];

var file = Path.Combine(info.WorkingDirectory, info.FileName);
if (!File.Exists(file))
throw new FileNotFoundException("File not found", file);

info.FileName = file;
info.UseShellExecute = false;
info.RedirectStandardInput = false;
info.RedirectStandardOutput = true;
Expand Down

0 comments on commit 8d3dbda

Please sign in to comment.