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

2022-02-22 Thread Alex fxmbsw7 Ratchev
i have observed many non on clean reproducable things over time On Tue, Feb 22, 2022, 22:00 Chet Ramey wrote: > On 2/22/22 3:38 PM, Benoit Lacelle wrote: > > bash-5.1# echo $PATH > > > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin > > > > bash-5.1# ls /usr/local/bin/npm > > > >

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

2022-02-22 Thread Chet Ramey
On 2/22/22 3:38 PM, Benoit Lacelle wrote: > bash-5.1# echo $PATH > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin > > bash-5.1# ls /usr/local/bin/npm > > */usr/local/bin/npm > > -> yes, there is such a file in a folder described by $PATH* I don't know what else to tell you. I c

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

2022-02-22 Thread Benoit Lacelle
bash-5.1# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin bash-5.1# ls /usr/local/bin/npm */usr/local/bin/npm-> yes, there is such a file in a folder described by $PATH* Le mar. 22 févr. 2022 à 21:37, Chet Ramey a écrit : > On 2/22/22 3:35 PM, Benoit Lacelle wrote: >

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

2022-02-22 Thread Chet Ramey
On 2/22/22 3:35 PM, Benoit Lacelle wrote: > I understand we observe the same behavior, except on 'hash npm'. So now you look at $PATH and see whether there are files named `npm' in any directory in $PATH. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars lon

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

2022-02-22 Thread Benoit Lacelle
OK: bash-5.1# type -a npm bash: type: npm: not found bash-5.1# ls -l /usr/local/bin/npm lrwxrwxrwx1 root root38 Jan 3 19:28 */usr/local/bin/npm* -> *../lib/node_modules/npm/bin/npm-cli.js* bash-5.1# ls -l /usr/local/lib/node_modules/npm/bin/npm-cli.js -rwxr-xr-x1 roo

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

2022-02-22 Thread Chet Ramey
On 2/22/22 2:51 PM, Benoit Lacelle wrote: > Thanks Chet, but I'm lost. What's next step? > > I do not reproduce the issue either on my local macos. But I do in a > CircleCI VM: > > / # bash > > bash-5.1# type -a npm > bash: type: npm: not found If it's supposed to be in /usr/local/bin/npm, I g

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

2022-02-22 Thread Greg Wooledge
On Tue, Feb 22, 2022 at 08:51:06PM +0100, Benoit Lacelle wrote: > / # bash > > bash-5.1# type -a npm > > bash: type: npm: not found Can you investigate further at this point? Show us the content of PATH, show us any and all npm files that are in every directory in PATH (including the permission

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

2022-02-22 Thread Benoit Lacelle
Thanks Chet, but I'm lost. What's next step? I do not reproduce the issue either on my local macos. But I do in a CircleCI VM: *circleci@a205c29cb489*:*~*$ docker run -it node:14.18.2-alpine sh Unable to find image 'node:14.18.2-alpine' locally 14.18.2-alpine: Pulling from library/node 59bf1c3

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

2022-02-22 Thread Chet Ramey
On 2/22/22 12:19 PM, Benoit Lacelle wrote: # docker run -it node:14.18.2-alpine sh Unable to find image 'node:14.18.2-alpine' locally 14.18.2-alpine: Pulling from library/node 59bf1c3509f3: Pull complete 331f5eb007b4: Pull complete bcd1922beba2: Pull complete 72573d587fdf: Pull complete Digest: sh

declare -x non-exportable variable types

2022-02-22 Thread Léa Gris
declare -x variable with unexportable flag/type is handled quite inconsistently: $ unset int_value && declare -ix int_value=42 && bash -c 'declare -p int_value' declare -x int_value="42" $ unset array && declare -ax array=(foo bar) && bash -c 'declare -p array' bash: line 1: declare: array: n

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

2022-02-22 Thread Benoit Lacelle
>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. 6.14.15 We observe 'sh' behave as expected in

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

2022-02-22 Thread Benoit Lacelle
Just in case, the reference github tickets holds additional details ( 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 environmen

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

2022-02-22 Thread Chet Ramey
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 > ). > I was unsure what best to provide

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

2022-02-22 Thread Chet Ramey
On 2/22/22 10:10 AM, Benoit Lacelle wrote: > Bash Version: 5.1 > Patch Level: 16 > Release Status: relase > Bash version: 5.1.16(1)-release (x86_64-alpine-linux-musl) > > Description: > Issue discussed at https://github.com/disney/meteor-base/pull/102 > Supposedly related with Bash5.1, 'hash npm'

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

2022-02-22 Thread Benoit Lacelle
Configuration Information [Automatically generated, do not change]: XXX Bash Version: 5.1 Patch Level: 16 Release Status: relase Bash version: 5.1.16(1)-release (x86_64-alpine-linux-musl) Description: Issue discussed at https://github.com/disney/meteor-base/pull/102 Supposedly related with Bash5.