Skip to content

Commit 8d3dbda

Browse files
committed
Fixed Python compile path
1 parent cdcf0b6 commit 8d3dbda

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

NEO-Debugger-Core/Utils/Compiler.cs

+5-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ public bool CompileContract(string sourceCode, string outputFilePath, SourceLang
5151
{
5252
case SourceLanguage.CSharp:
5353
{
54-
info.FileName = "neon.exe";
54+
var file = Path.Combine(info.WorkingDirectory, "neon.exe");
55+
if (!File.Exists(file))
56+
throw new FileNotFoundException("File not found", file);
57+
58+
info.FileName = file;
5559
info.Arguments = "\"" + outputFilePath + "\"";
5660
break;
5761
}
@@ -74,11 +78,6 @@ public bool CompileContract(string sourceCode, string outputFilePath, SourceLang
7478

7579
info.WorkingDirectory = _settings.compilerPaths[language];
7680

77-
var file = Path.Combine(info.WorkingDirectory, info.FileName);
78-
if (!File.Exists(file))
79-
throw new FileNotFoundException("File not found", file);
80-
81-
info.FileName = file;
8281
info.UseShellExecute = false;
8382
info.RedirectStandardInput = false;
8483
info.RedirectStandardOutput = true;

0 commit comments

Comments
 (0)