Skip to content

Commit a8b84a1

Browse files
committed
Solving a runtime bug in Windows
1 parent 03fc839 commit a8b84a1

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Diff for: js/index.js

+3-8
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,10 @@ function runCode() {
125125
var tmp_file = Path.join(__dirname, "tmp", "tmpcode"+(count++));
126126
fs.writeFileSync(tmp_file, code);
127127

128-
runner.exec(php_path + " -d'error_reporting=E_ALL' -d'display_errors=On' '" + tmp_file + "'", function(err, phpResponse, stderr) {
128+
runner.exec(php_path + ' -d"error_reporting=E_ALL" -d"display_errors=On" "' + tmp_file + '"', function(err, phpResponse, stderr) {
129129
fs.unlink(tmp_file);
130-
if (err) {
131-
setBusy(false);
132-
// User doesn't need to know where the file is
133-
setOutput(phpResponse.replace(' in ' + tmp_file, ''));
134-
return false;
135-
}
136-
setOutput(phpResponse);
130+
// User doesn't need to know where the file is
131+
setOutput(phpResponse.replace(' in ' + tmp_file, ''));
137132
setBusy(false);
138133
});
139134
}

0 commit comments

Comments
 (0)