From 68d360e5e991fdc2a6f75c857c8a10cabfca10f2 Mon Sep 17 00:00:00 2001 From: plondon Date: Sat, 23 Oct 2021 13:49:50 -0400 Subject: [PATCH] Remove repl from elixir --- backend/api.js | 14 +++++++------- langs/elixir.yaml | 2 -- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/backend/api.js b/backend/api.js index 8e565eb..5ff736a 100644 --- a/backend/api.js +++ b/backend/api.js @@ -233,7 +233,7 @@ export class Session { this.logBadMessage(msg); break; } - await this.runCode(msg.code + "\x04", msg.expectedOutput); + await this.runCode(msg.code, msg.expectedOutput); break; case "formatCode": if (typeof msg.code !== "string") { @@ -291,12 +291,12 @@ export class Session { this.config; if (this.term) { try { - process.kill(this.term.pty.pid, 'SIGKILL'); + process.kill(this.term.pty.pid, "SIGKILL"); } catch (err) { this.send({ - event: 'error doing process.kill', - err - }) + event: "error doing process.kill", + err, + }); // process might have already exited } // Signal to terminalOutput message generator using closure. @@ -313,7 +313,7 @@ export class Session { } else if (repl) { cmdline = repl; } else { - cmdline = `echo '${name} has no REPL, press Run to see it in action'`; + cmdline = `Press Run to see your code in action!`; } if (code === undefined) { code = createEmpty !== undefined ? createEmpty : template + "\n"; @@ -333,7 +333,7 @@ export class Session { // Capture term in closure so that we don't keep sending output // from the old pty even after it's been killed (see ghci). if (term.live) { - const output = data.toString(); + const output = data.toString("utf8"); this.send({ event: "terminalOutput", diff --git a/langs/elixir.yaml b/langs/elixir.yaml index 75e36f8..999f06c 100644 --- a/langs/elixir.yaml +++ b/langs/elixir.yaml @@ -17,8 +17,6 @@ install: unzip -d "${pkg}/opt/elixir-ls" elixir-ls.zip ln -s /opt/elixir-ls/language_server.sh "${pkg}/usr/local/bin/elixir-ls" -repl: | - iex input: | DELAY: 1 123 * 234