Skip to content

Commit

Permalink
fix(core): patched console \n escape on most cmds (closes #533)
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Dec 19, 2021
1 parent 9cdb056 commit 05d1cf2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
- [ ] Migrate console log to new logger
- [ ] Migrate all log routes
- [ ] Add download modal to log pages
- [ ] replace all fxRunner.srvCmd* and only expose:
- sync fxRunner.srvRawCmd(string) - to be used by live console
- async fxRunner.srvCmd(array, timeout) - to be awaited with the status response





Expand Down
5 changes: 3 additions & 2 deletions src/components/fxRunner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,10 @@ module.exports = class FXRunner {
srvCmd(command) {
if (typeof command !== 'string') throw new Error('Expected String!');
if (this.fxChild === null) return false;
const sanitized = command.replaceAll(/\n/g, ' ');
try {
const success = this.fxChild.stdin.write(command + '\n');
globals.logger.fxserver.writeMarker('command', command);
const success = this.fxChild.stdin.write(sanitized + '\n');
globals.logger.fxserver.writeMarker('command', sanitized);
return success;
} catch (error) {
if (GlobalData.verbose) {
Expand Down

0 comments on commit 05d1cf2

Please sign in to comment.