[Top][All Lists]

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

Re: 'hash foo' may fail, and would require something like 'hash /usr/bin

From: Benoit Lacelle
Subject: Re: 'hash foo' may fail, and would require something like 'hash /usr/bin/foo'
Date: Tue, 22 Feb 2022 18:19:17 +0100

>From local MacOS (within Docker):

bash-5.1# type -a npm

npm is /usr/local/bin/npm

>From remote CircleCI (within Docker):

bash-5.1# type -a npm

bash: type: npm: not found

bash-5.1# npm --version <-- For the sake of confirming npm is resolved.


We observe 'sh' behave as expected in given environment:

/ # hash npm

/ # type -a npm


'less npm' shows npm is a script file, starting with:

'#!/usr/bin/env node'

I would be happy to provide additional details.

Le mar. 22 févr. 2022 à 17:53, Chet Ramey <chet.ramey@case.edu> a écrit :

> On 2/22/22 11:48 AM, Benoit Lacelle wrote:
> > Just in case, the reference github tickets holds additional details
> > (https://github.com/disney/meteor-base/pull/102#issuecomment-1047254127
> > <https://github.com/disney/meteor-base/pull/102#issuecomment-1047254127
> >).
> > I was unsure what best to provide in this report.
> >
> > By fail, I mean 'hash npm' unexpectedly returns 'bash: hash: npm: not
> > found' in given CircleCI environment, while in other environments (e.g.
> > local MacOS), it returns (as expected) an empty output (as in both
> > cases, 'npm' does succeeded resolving a path and execuring npm).
> Then either it's not in $PATH or the `npm' found first in $PATH is not an
> executable file.
> I wonder if `type -a npm' right after the `hash npm' would show something
> more.
> --
> ``The lyf so short, the craft so long to lerne.'' - Chaucer
>                  ``Ars longa, vita brevis'' - Hippocrates
> Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Benoit Lacelle
Java/ML/BigData Elite Engineer
+33 6 78 83 92 66

reply via email to

[Prev in Thread] Current Thread [Next in Thread]