Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sed with globbing introduces newlines between file contents #964

Open
joshi-sh opened this issue Sep 7, 2019 · 1 comment
Open

sed with globbing introduces newlines between file contents #964

joshi-sh opened this issue Sep 7, 2019 · 1 comment

Comments

@joshi-sh
Copy link
Contributor

joshi-sh commented Sep 7, 2019

Node version (or tell us if you're using electron or some other framework):

NodeJS 9.11.2

ShellJS version (the most recent version/Github branch you see the bug on):

0.8.3/master

Operating system:

WSL (Ubuntu) on Windows

Description of the bug:

When running sed on multiple files a newline is introduced between the file contents

Example ShellJS command to reproduce the error:

(Assuming file1.txt is test1\n and file2.txt is test2\n)

shell.sed('test', 'hello', 'file*.txt');

Expected: hello1\nhello2\n
Got: hello1\n\nhello2\n

@nfischer
Copy link
Member

This doesn't seem to be globbing specific. I think sed() is just adding a newline to the end each file (except the final one). Is this the same root cause as #900?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants