Merge pull request #474 from Brikaa/stdin-newline
Piston Nix: Add trailing newline in stdin if it doesn't exist
This commit is contained in:
commit
1fa110c1cf
|
@ -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…
Reference in New Issue