nrfutil device should respect system library path

I would assume that nrfutil device will respect MacOS DYLD_LIBRARY_PATH environment variable but instead it fails to load libjlinkarm.dylib.

Steps to reproduce:
- Run nrfutil device with specified DYLD_LIBRARY_PATH:
DYLD_LIBRARY_PATH='./segger-jlink-852/lib' nrfutil device fw-info

WARNING: JLinkARM DLL not found. Devices that require J-Link will not be recognized correctly, and J-Link operations will not be available. Install SEGGER J-Link from www.segger.com/.../. Currently tested version: JLink_V8.42.

Error: No devices with requested serial number(s) or trait(s) found

I've tried: --jlink-dll <PATH> but it's not the cleanest solution.

Related