File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,8 +10,6 @@ const uniqueFilename = require("unique-filename");
1010 *
1111 * @param input The code that should be executed
1212 * @param language Language of the input parameter
13- * @param args Array of arguments to run the code
14- * @param options Options Parameter
1513 * @returns Result of the code
1614 */
1715export default async function execute (
@@ -53,7 +51,11 @@ export default async function execute(
5351 // Delete created file
5452 unlinkSync ( temppath ) ;
5553
56- if ( stderr ) return reject ( stderr ) ;
54+ if ( stderr ) {
55+ // Remove newline from stderr
56+ if ( stderr . endsWith ( "\n" ) ) stderr = stderr . slice ( 0 , - 1 ) ;
57+ return reject ( stderr ) ;
58+ }
5759
5860 // Remove newline from stdout
5961 if ( stdout . endsWith ( "\n" ) ) stdout = stdout . slice ( 0 , - 1 ) ;
You can’t perform that action at this time.
0 commit comments