Skip to content

Conversation

@basti1253
Copy link
Contributor

By calling which node nodejs which reports an error even if there's an existing nodejs installation in $PATH.
It silently ignores that non existing issue now.

Before: http://imagebin.org/181889
After: http://imagebin.org/181890

By calling `which node nodejs` which reports an error even if there's an existing nodejs installation in $PATH.
It silently ignores that non existing issue now.

Before: http://imagebin.org/181889
After: http://imagebin.org/181890
@jzaefferer
Copy link
Member

Seems like we should rather fix the underlying issue. Whatever that is. You screenshots are gone, so can't see them.

@jzaefferer jzaefferer closed this Nov 17, 2011
@rdworth
Copy link
Contributor

rdworth commented Nov 17, 2011

Also for me which node nodejs does not report any error, so cannot reproduce

@basti1253
Copy link
Contributor Author

Images were removed after 2 weeks.. ;)
My small patch just pipes stderr to /dev/null. I guess you both guys use macos, which reports no error there (no clue what shell or what version of which macos ships). I'm on archlinux and which is less tolerant over here (using bash 4.2).

basti@basti-desktop:~$ which node nodejs
/usr/bin/node
which: no nodejs in (/home/basti/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/share/java/apache-ant/bin:/opt/java/bin:/opt/java/db/bin:/opt/java/jre/bin:/usr/bin/vendor_perl:/usr/bin/core_perl)
basti@basti-desktop:~$ which node nodejs 2>/dev/null
/usr/bin/node

if there's no node/nodejs in path the execution of which returns an error (something different than -1 if i remember right) and conditional execution of

$(which node nodejs) args
stops as it would if statement 1 is false in JS too ( !! foo && foo() ).

If there's the estimated 1 nodejs executable nodejs gets called but the error message appears nevertheless. In my opinion the underlying issue is fixed if you pipe stderror to stdout.

best regards

Sebastian

@jzaefferer jzaefferer reopened this Nov 17, 2011
@jzaefferer
Copy link
Member

@gnarf37 could you take a look at this?

@gnarf
Copy link
Member

gnarf commented Nov 17, 2011

We can merge this in to cause less errors in other places, it shouldn't affect the build negatively...

rdworth added a commit that referenced this pull request Nov 17, 2011
build: removes disturbing error outputs on which call
@rdworth rdworth merged commit d764388 into jquery:master Nov 17, 2011
rdworth added a commit that referenced this pull request Nov 17, 2011
build: removes disturbing error outputs on which call(cherry picked from commit d764388)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants