Unable to Override PATH or NVM_DIR environment variables with Ubuntu 20.04 Machine images

Ubuntu 20.04 images set $BASH_ENV in a way that they can not be overridden via the environment parameter.

For example, the following with not change the $PATH

 

steps:
  - run:
      environment:
        PATH: /usr/local/bin
jobs:
  build:
    environment:
        PATH: /usr/local/bin

To work around this issue, customers can add an export step at the top of the run step where the environment variable is used

- run: |
    export PATH=/usr/local/bin
    # additional commands

 

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.