Bug 35719 - which(1) ignore empty components of $PATH.
Summary: which(1) ignore empty components of $PATH.
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 1.0-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-09 23:30 UTC by Wolfram Schneider
Modified: 2002-06-30 06:49 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schneider freebsd_committer freebsd_triage 2002-03-09 23:30:00 UTC
      The new c version of which(1) command 
ignore empty components of $PATH.

$ cd /bin
$ env PATH=: which date
$ echo $?
1


It should print:
./date
Comment 1 Tim Robbins freebsd_committer freebsd_triage 2002-06-30 06:35:49 UTC
State Changed
From-To: open->closed

This bug no longer exists: 
$ cd /bin 
$ env PATH=: /usr/bin/which date 
./date 
$ uname -r  
4.6-RELEASE-p1
Comment 2 Tim Robbins freebsd_committer freebsd_triage 2002-06-30 06:40:35 UTC
State Changed
From-To: closed->open

.. but it does apply to -current. Please do not destroy the Release and 
Environment fields.
Comment 3 Tim Robbins freebsd_committer freebsd_triage 2002-06-30 06:49:02 UTC
State Changed
From-To: open->closed

Rev. 1.4 of which.c corrects this problem. Thanks for pointing it out.