Problem uploading to Teensy 3.2 on OSX: "Error opening HID Manager"


I am trying to upload some code from Atom to my Teensy 3.2 using PlatformIO.

OS X 10.11.6
Atom 1.9.9
PlatformIO-IDE 1.4.0
PlatformIO-IDE-Terminal 2.2.0
XCode is installed,

$ xcrun --version
xcrun version 29

The program builds fine, but upload fails. Uploading using the Arduino IDE + Teensyduino works perfectly.

PlatformIOs output currently looks like this:

Check program size...
text       data     bss     dec     hex filename
11160       172    2292   13624    3538 .pioenvs/teensy31/firmware.elf
arm-none-eabi-objcopy -O ihex -R .eeprom .pioenvs/teensy31/firmware.elf .pioenvs/teensy31/firmware.hex
"/Users/daro/.platformio/packages/tool-teensy/teensy_loader_cli" -mmcu=mk20dx256 -w -s -v .pioenvs/tee
Teensy Loader, Command Line, Version 2.0
Read ".pioenvs/teensy31/firmware.hex": 11332 bytes, 4.3% usage
Error opening HID Manager
Soft reboot is not implemented for OSX
Waiting for Teensy device...
(hint: press the reset button)

And yes, I am pressing the reset button :wink:

I saw the tip under System Specific Setup about changing the line in the makefile to
SDK ?= /Applications/
but it seems the line
SDK ?= $(shell xcrun --show-sdk-path)
is smarter and seems to be returning the correct path:

$ xcrun --show-sdk-path

I even tried building the teensy_loader from source (link) both with and without the #USE_LIBUSB ?= YES line active.

Any help would be greatly appreciated!

I have found an ugly hack solution. But hey, it works [for me]!

I will link to the thread on the PJRC forums because it’s a problem with the teensy_loader_cli.