Node version (or tell us if you're using electron or some other framework):
All?
ShellJS version (the most recent version/Github branch you see the bug on):
tip-of-tree (GitHub main branch)
Operating system:
All?
Description of the bug:
I think there's a double-newline in sed() outupt there shouldn't be:
|
const result = shell.sed('-i', 'test', 'hello', `${t.context.tmp}/file*.txt`); |
|
t.falsy(shell.error()); |
|
t.is(result.code, 0); |
|
t.is(result.toString(), 'hello1\n\nhello2\n'); // TODO: fix sed's behavior |
Need to investigate more and figure out what's going on here.
Example ShellJS command to reproduce the error:
The \n\n between "hello1" and "hello2" should probably only be a single \n.
|
const result = shell.sed('-i', 'test', 'hello', `${t.context.tmp}/file*.txt`); |
|
t.falsy(shell.error()); |
|
t.is(result.code, 0); |
|
t.is(result.toString(), 'hello1\n\nhello2\n'); // TODO: fix sed's behavior |
Node version (or tell us if you're using electron or some other framework):
All?
ShellJS version (the most recent version/Github branch you see the bug on):
tip-of-tree (GitHub main branch)
Operating system:
All?
Description of the bug:
I think there's a double-newline in
sed()outupt there shouldn't be:shelljs/test/sed.js
Lines 170 to 173 in 1a8e38d
Need to investigate more and figure out what's going on here.
Example ShellJS command to reproduce the error:
The
\n\nbetween "hello1" and "hello2" should probably only be a single\n.shelljs/test/sed.js
Lines 170 to 173 in 1a8e38d