Opened 17 years ago
Closed 17 years ago
#2130 closed bug (fixed)
[which] behaves unexpected
Reported by: | andreasf | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | Applications/Command Line Tools | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
The exit code of which
is not inline with the expectations of some ./autogen.sh
and similar scripts.
which someexistingtool || echo "You need someexitingtool >= 0.2"
is expected to print the message iff someexistingtool is not found. On Haiku it is sometimes inversed.
Change History (3)
comment:1 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Not quite fixed yet...
When running from the Terminal it appears to work as expected now, but not from inside a script:
cat test-which.sh
:
#!/bin/sh which gcc || echo $?
which gcc || echo $?
:
/boot/develop/tools/gnupro/bin/gcc
./test-which.sh
:
./test-which.sh: line 2: which: command not found 127
Note:
See TracTickets
for help on using tickets.
Fixed in hrev25169.