[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: command -v in postinsts violating policy



On Mon, 27 May 2002, Luca - De Whiskey's - De Vitis wrote:

> Hi Adam,
>
> > If there is an existing command out there, called '-q', and we suddenly add a
> > '-q' option to which, then the old behaviour of which will be broken.
> >
> > Previously, you only needed to do 'which -q' to find this program.
>
> This does not work with current which:
> $ which -q
> /usr/bin/which: type: illegal option: -q
> type: usage: type [-apt] name [name ...]
>
> I tried on macOS X it works only if `-q' is executeble, and if you use
> `which -- -q', it try to check for the existence of `--' (macOS X is the only
> other unix i've access to).
>
> OTOH, even `command -v' can fail with a `-p' command in /usr/bin.
> To test for the existence of `-p' command you have to call `command -v -- -p'
>
> So, now?
> I think that the right behaviour is that of the Debian's which, and adding a
> flag -q will be of no harm.
>
> I may be wrong, tell me.

Please see bug 148178.



-- 
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: