Skip to content

fix(ls): no trailing newline for empty directories#425

Merged
ariporad merged 1 commit intomasterfrom
fix-newline-behavior
Apr 14, 2016
Merged

fix(ls): no trailing newline for empty directories#425
ariporad merged 1 commit intomasterfrom
fix-newline-behavior

Conversation

@nfischer
Copy link
Copy Markdown
Member

ls('empty') used to have a .stdout property of "\n", which is wrong. This fixes that. Trailing newlines are only appended for arrays that have length > 0.

Once this gets fixed, almost all newline output will be consistent for the various shelljs commands. This is a partial fix for #420 (pwd(), echo(), and which() still need to be fixed).

@nfischer nfischer added the fix Bug/defect, or a fix for such a problem label Apr 14, 2016
@nfischer nfischer added this to the v0.7.0 milestone Apr 14, 2016
@ariporad
Copy link
Copy Markdown
Contributor

LGTM!

@ariporad ariporad merged commit 7f802ed into master Apr 14, 2016
@ariporad ariporad deleted the fix-newline-behavior branch April 14, 2016 23:28
@nfischer nfischer mentioned this pull request Apr 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Bug/defect, or a fix for such a problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants