How does nRF Connect for VS Code determine the shell for default "Build" and "Flash" tasks?

I installed west and other additional Python dependencies in a Python virtual environment. Therefore, when I run the "Build" task from the Actions View, the task failed with an error message:

/bin/sh: west: command not found

I know that the integrated terminal can activate the Python virtual environment when sourcing a shell configuration file, and therefore I can run west build in the integrated terminal successfully.

Eventually, I do want the tasks in the Actions View to successfully run west as well. And to do this without forgoing the virtual environment, I believe I need to better understand how nRF Connect for VS Code determines the shell for tasks in the Actions View.

I'm on macOS 13.3.1 using nRF Connect for VS Code 2023.4.148. It looks like the tasks in the Actions View use /bin/sh as their shell.

As far as I'm aware, setting "terminal.integrated.automationProfile.osx".path in settings.json or "options.shell" in tasks.json does not change the shell for tasks in the Actions View. Nor does setting "nrf-connect.west.env" in settings.json help. "nrf-connect.taskBindings" will overwrite the default tasks in the Actions View.

Any clarification on how nRF Connect for VS Code determines the shell for tasks in the Actions View is appreciated.

Related