File tree Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Expand file tree Collapse file tree 4 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 3030 },
3131 "homepage" : " https://github.com/simonkoeck/code-execution-engine#readme" ,
3232 "dependencies" : {
33- "command-exists" : " ^1.2.9" ,
3433 "unique-filename" : " ^1.1.1"
3534 }
3635}
Original file line number Diff line number Diff line change 1+ @ echo off
2+ %1
Original file line number Diff line number Diff line change @@ -30,14 +30,10 @@ export default async function execute(
3030 throw Error ( "Your OS is not supported yet." ) ;
3131 }
3232
33- // Check if Command Exists
34- if ( ! commandExists ( language ) ) {
35- throw new Error ( "This language is not installed on the machine" ) ;
36- }
37-
3833 // Write File to temp folder
3934 var temppath : string = uniqueFilename ( tmpdir ( ) ) ;
4035 if ( language == Language . C ) temppath += ".c" ;
36+ else if ( language == Language . BATCH ) temppath += ".bat" ;
4137 writeFileSync ( temppath , input , { encoding : "utf-8" } ) ;
4238
4339 // Command to execute runner
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ enum Language {
22 PYTHON3 = "python3" ,
33 C = "gcc" ,
44 BASH = "bash" ,
5+ BATCH = "bat"
56}
67
78export default Language ;
You can’t perform that action at this time.
0 commit comments