-
Notifications
You must be signed in to change notification settings - Fork 743
Open
Labels
breakingBreaking changeBreaking change
Milestone
Description
Hello! First of all, ShellJS is awesome, and I'm really excited about the project!
I was messing around with shx a little and noticed some inconsistent behavior with the ShellString class:
- When a
ShellStringobject is created with aString, the resultingShellString'sstdoutproperty is set to that string. source - When a
ShellStringobject is created with anArray, the resultingShellString'sstdoutproperty is set to a newline-joined string of thatArraywith an extra newline character appended. source
Thank you, and please let me know if you'd like me to make a PR with additional ShellString tests.
shelljs|master ⇒ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
shelljs|master ⇒ git rev-parse HEAD
193efa7048d03db184ae3c27566b3a5f54699fdd
shelljs|master ⇒ node -v
v5.10.0
shelljs|master ⇒ npm -v
3.8.3
shelljs|master ⇒ node
> var shell = require('./shell.js');
undefined
> var ShellString = shell.ShellString;
undefined
> var output = new ShellString('meow');
undefined
> output.stdout;
'meow'
> var output2 = new ShellString(['cat', 'says', 'meow']);
undefined
> output2.stdout;
'cat\nsays\nmeow\n'
>
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breakingBreaking changeBreaking change