-
Notifications
You must be signed in to change notification settings - Fork 723
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
ls() not returning an Array #446
Comments
It returns an array with some extra attributes. Does this break your code? |
Well, I have some issues with the attributes that don't act as expected (especially for an Array), like with shelljs@0.6.0:
with shelljs@0.7.0:
I get the idea of pipes, but since I'm waiting for an array, I'm expecting "standard" array prototype methods to work as anywhere else. |
As a side note, with shelljs@0.6.0:
with shelljs@0.7.0:
This second problem is not a big deal, but it sure breaks code for some. |
PS: I get it if it's by design, but in this case maybe it should be advertised in the docs. |
Thanks for pointing that out. I'll investigate. |
@jcbohin I can't reproduce the issue with the absence of the trailing Node v6.0, shelljs v0.7, Ubuntu |
@nfischer I'm positive on the repro with Node v6.2, shelljs v0.7, OS X v15.5:
|
@nfischer you are right about ubuntu, I was unable to repro on Ubuntu with Node v5.11.1 Could be an OSX issue. Would you like me to create a separate issue (since it's different from the Array methods overriding discussed in this one ?) Also if you don't have access to an OSX install I can help you pinpoint the problem and/or test a branch locally. Edit: works fine with windows, definitively an os-specific case |
@jcbohin Yeah, see if you can take a look at this issue on OS X. I'm going to open a PR adding a specific test case for this. If that PR fails (as your comments suggest it should on our OS X CI), then I'll open the issue. |
I'm on OSX as well, having the same issue except with all the functions, even pwd() gives me an array of output rather than a single line |
@ariporad could you please look into this? |
@nfischer: Confirmed on macOS, looking into it. |
OK, so I've figured this out: On macOS, This is basically our problem. I'm looking into it more. Also, @jcbohin: We don't support OS X 15.5.0. It's not really a thing that exists 😝. |
This appears to be just how |
Travis is conveniently experiencing an outage for their macOS workers at the moment. |
@ariporad good catch, it's OS X 10.11.5 (the kernel is 15.5.0, as stated by |
Node version:
v6.2.0
ShellJS version (the most recent version/Github branch you see the bug on):
0.7.0
Operating system:
OSX 15.5.0
Description of the bug:
shelljs.ls()
returns an object containing results (files and folders as elements of the array) and a bunch of methods and no longer an Array (as it used to do until 0.7 and as described in the docs :Example ShellJS command to reproduce the error:
The text was updated successfully, but these errors were encountered: