Deivitto / auditor-docker

Home Page:https://hackmd.io/7zriwLB0SD6-3AUDv3pBBg?view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`yarn` is not recognized as a command

Deivitto opened this issue · comments

Yarn is installed in ~/.yarn, however, even if the path is declared at .bashrc, there is another line that I don't know yet why, it is overriding it. The line is line 125 in .basrhc after a clean installation:

- export PATH=":/home/whitehat/.nvm/versions/node/v18.17.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/whitehat/.local/bin"
+ export PATH="$PATH:/home/whitehat/.nvm/versions/node/v18.17.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/whitehat/.local/bin"

As can be notice, it is not appending $PATH variable, what actually fixes it into a regular installation. Need to further investigate. Meanwhile, the hotfix is just to append yarn after that line:

# Dockerfile#L166
# Append the specified PATH to .bashrc 
RUN echo 'export PATH="$PATH:$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin"' >> ~/.bashrc

hotfixed at c9af46d