nrfutil toolchain-manager launch --terminal does not work on Windows

My understanding is that the Toolchain Manager provided by the nRF Connect GUI desktop app is deprecated. I have uninstalled all toolchains and SDKs installed by that app and reinstalled them using the nRF Connect extension in VS Code. My understanding also is that I can still get CLI functionality using nrfutil.

I downloaded the nrfutil executable and made it available via the system path. I have also installed the "toolchain-manager" and "device" modules for nrfutil. I am now trying to start an interactive terminal with proper build environment set up. No matter what I do, I just get immediately dumped back to the Windows command prompt. I have tried both from cmd.exe and Git bash.

When I do use `nrfutil toolchain-manager launch --shell` in WSL/Ubuntu, it works properly and I get a new shell environment.

Here is trace log output from the Windows version of nrfutil after attempting to start a shell. The shell is closed within 50ms with exit code 0. There is no other error information.

[2024-03-27T15:24:30.667Z] [nrfutil-toolchain-manager] INFO - nrfutil-toolchain-manager (version = 0.14.2, platform = x86_64-pc-windows-msvc) invoked with launch --log-level trace --log-output=file --ncs-version v2.5.0 --terminal
[2024-03-27T15:24:30.668Z] [nrfutil-toolchain-manager] INFO - Retrieving toolchains from file C:\ncs\toolchains\toolchains.json
[2024-03-27T15:24:30.668Z] [nrfutil-toolchain-manager] TRACE - Opening and locking file: C:\ncs\toolchains\toolchains.json
[2024-03-27T15:24:30.714Z] [nrfutil-toolchain-manager] INFO - Exit code: exit code: 0

Here is a similar log from the Linux version of nrfutil running in WSL2/Ubuntu 22.04. The shell is not closed until I type `exit` three seconds later and this time it has an exit code of 127.

[2024-03-27T15:25:26.403Z] [nrfutil-toolchain-manager] INFO - nrfutil-toolchain-manager (version = 0.14.1, platform = x86_64-unknown-linux-gnu) invoked with launch --log-level trace --log-output=file --ncs-version v2.5.0 --shell
[2024-03-27T15:25:26.403Z] [nrfutil-toolchain-manager] DEBUG - Constructing the configuration from the defaults
[2024-03-27T15:25:26.403Z] [nrfutil-toolchain-manager] DEBUG - Current config: Config { install_dir: "/home/afont/ncs", toolchain_index: None }
[2024-03-27T15:25:26.403Z] [nrfutil-toolchain-manager] INFO - Retrieving toolchains from file /home/afont/ncs/toolchains/toolchains.json
[2024-03-27T15:25:26.403Z] [nrfutil-toolchain-manager] TRACE - Opening and locking file: /home/afont/ncs/toolchains/toolchains.json
[2024-03-27T15:25:29.736Z] [nrfutil-toolchain-manager] INFO - Exit code: exit status: 127

Is there something I am doing wrong that is preventing this from working in Windows?

Related