Skip to content

Commit

Permalink
Solving a runtime bug in Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
rafajaques committed Apr 21, 2016
1 parent 03fc839 commit a8b84a1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,15 +125,10 @@ function runCode() {
var tmp_file = Path.join(__dirname, "tmp", "tmpcode"+(count++));
fs.writeFileSync(tmp_file, code);

runner.exec(php_path + " -d'error_reporting=E_ALL' -d'display_errors=On' '" + tmp_file + "'", function(err, phpResponse, stderr) {
runner.exec(php_path + ' -d"error_reporting=E_ALL" -d"display_errors=On" "' + tmp_file + '"', function(err, phpResponse, stderr) {
fs.unlink(tmp_file);
if (err) {
setBusy(false);
// User doesn't need to know where the file is
setOutput(phpResponse.replace(' in ' + tmp_file, ''));
return false;
}
setOutput(phpResponse);
// User doesn't need to know where the file is
setOutput(phpResponse.replace(' in ' + tmp_file, ''));
setBusy(false);
});
}
Expand Down

0 comments on commit a8b84a1

Please sign in to comment.