Closed yvo-niedrich closed 7 years ago
Hmmm this is strange. I'll investigate sometime this week.
Does the command work if you install shx globally?
I just fetched the repo on my own mac und everything is working fine with shx 0.2.0 (global and local).
It seems to be something strange in combination with the maven build environment. I'll setup maven tomorrow and have post my findings...
@Ungolianth thanks for investigating. If we can pinpoint the issue of this, I would be interested in working on a workaround or a fix. Let me know if I can of help during the investigation.
Looks like we're already testing cp
. If there's a way we can better test this, feel free to send a PR.
Hmmm... I'm running into this issue on my local machine now. It seems to be any command that isn't receiving piped input.
I see an issue when I run
> shell.exec('shx ls');
This is possibly a regression caused by #89.
It looks like process.stdin.isTTY
doesn't always work exactly how we want. We should look carefully for a good alternative. Ideally, we want a way to read all of stdin, or throw an exception if stdin is not being written to.
After thinking about this for a bit, the best quick-fix I can come up with is this:
shx rm ...
, shx cp ...
)shx cat file1.txt file2.txt
, shx sort file.txt
)shx cat
, shx sort
)This approach should prevent issues like what we're seeing here, at least until we can find a more suitable alternative for process.stdin.isTTY
.
I'll have this out in v0.2.1 this week.
I noticed that shx is just hanging under Cygwin and git bash shell for Windows. Is this the same issue?
@bhousel #98 should fix this. Feel free to leave comments on it if you see any issues, otherwise I'll release it tonight as a patch
Feel free to leave comments on it if you see any issues, otherwise I'll release it tonight as a patch
Thanks for the quick fix! I can confirm 0.2.1 is working great 👍
The following command is part of my "postinstall"-routine in
package.json
:With v0.1.4 everything is working fine, but after updating my dependencies (shx v0.2.0)
npm install
would not finish on travis or my buddies OSX; while i had no trouble running the script on windows.Edit:
package.json
and other stuff can be found here