mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-24 14:06:27 +02:00
Add trailing newline in stdin if it doesn't exist
This commit is contained in:
parent
61a833ca3c
commit
8bb72837b9
1 changed files with 4 additions and 0 deletions
|
@ -44,6 +44,10 @@ class Job {
|
|||
|
||||
this.args = args;
|
||||
this.stdin = stdin;
|
||||
// Add a trailing newline if it doesn't exist
|
||||
if (this.stdin.slice(-1) !== '\n') {
|
||||
this.stdin += '\n';
|
||||
}
|
||||
|
||||
this.timeouts = timeouts;
|
||||
this.memory_limits = memory_limits;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue