nRF Connect for VS Code warns about ZEPHYR_BASE being overwritten by the shell config starting with version 2025.8.654

nRF Connect for VS Code v2025.8.654+ on Ubuntu 24.04, always shows a false warning that the shell config overwrites ZEPHYR_BASE when a terminal window is open. The variable is not defined anywhere in shell, env, or VS Code. Same config works fine in v2025.5.152 (no warning).

Is anyone else having this issue and does someone have a fix?

Steps to Reproduce:

  1. Install VS Code and nRF Connect for VS Code on Ubuntu 24.04.
  2. Use a clean workspace with no manual ZEPHYR_BASE set in shell config (.bashrc, .profile, etc.), environment, or VS Code settings.
  3. Select the nRF Connect extension.
  4. Open a terminal (with the 'Open terminal' option, CTRL-` or any other way)

The extension shows a persistent warning in the bottom-right (see attached screenshot):
"Shell initialization overwrites ZEPHYR_BASE

Your shell configuration file appears to overwrite the ZEPHYR_BASE environment variable. Overwriting the variable can cause west commands to use the wrong installation of the nRF Connect SDK in the built-in terminal. More information page."

The screenshot below shows the warning while no ZEPHYR environment variables are set. (the screenshot was taken from a devcontainer but even a brand new Linux installation behaves this way)

Parents
  • I’m experiencing the exact same issue on Ubuntu 24.04 with nRF Connect for VS Code v2025.8.654.
    No ZEPHYR_BASE variable is set in my shell (.bashrc, .zshrc, .profile, etc.), nor in VS Code settings or the system environment, but the extension still shows the “Shell initialization overwrites ZEPHYR_BASE” warning whenever a terminal is opened.

    Downgrading to version undead corridor removes the warning completely, so it seems to have been introduced in the newer release.
    It looks like a false positive detection in the latest version — possibly related to how the extension initializes or checks the terminal environment.

Reply
  • I’m experiencing the exact same issue on Ubuntu 24.04 with nRF Connect for VS Code v2025.8.654.
    No ZEPHYR_BASE variable is set in my shell (.bashrc, .zshrc, .profile, etc.), nor in VS Code settings or the system environment, but the extension still shows the “Shell initialization overwrites ZEPHYR_BASE” warning whenever a terminal is opened.

    Downgrading to version undead corridor removes the warning completely, so it seems to have been introduced in the newer release.
    It looks like a false positive detection in the latest version — possibly related to how the extension initializes or checks the terminal environment.

Children
No Data
Related