We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07ada49 commit 8026833Copy full SHA for 8026833
src/executor.ts
@@ -10,8 +10,6 @@ const uniqueFilename = require("unique-filename");
10
*
11
* @param input The code that should be executed
12
* @param language Language of the input parameter
13
- * @param args Array of arguments to run the code
14
- * @param options Options Parameter
15
* @returns Result of the code
16
*/
17
export default async function execute(
@@ -53,7 +51,11 @@ export default async function execute(
53
51
// Delete created file
54
52
unlinkSync(temppath);
55
56
- if (stderr) return reject(stderr);
+ if (stderr) {
+ // Remove newline from stderr
+ if (stderr.endsWith("\n")) stderr = stderr.slice(0, -1);
57
+ return reject(stderr);
58
+ }
59
60
// Remove newline from stdout
61
if (stdout.endsWith("\n")) stdout = stdout.slice(0, -1);
0 commit comments