From 5c7eb2427a1ba78f12621aa8d1b60e9c9f92f8f4 Mon Sep 17 00:00:00 2001 From: John SJ Anderson Date: Sat, 28 Oct 2017 12:13:04 -0700 Subject: [PATCH] Don't flash the device unless we successfully detected the device Nicer error messages are nicer. --- bin/kaleidoscope-builder | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/kaleidoscope-builder b/bin/kaleidoscope-builder index 087e8c87..9db051e9 100755 --- a/bin/kaleidoscope-builder +++ b/bin/kaleidoscope-builder @@ -212,6 +212,15 @@ clean () { } reset_device () { + if [ -z $DEVICE_PORT ]; then + echo "Couldn't autodetect the keyboard's serial port." + echo "If you see this message and your keyboard is connected to your computer," + echo "it probably means that our serial port detection logic is buggy or incomplete." + echo + echo "Please report this issue at https://github.com/keyboardio/Kaleidoscope"; + exit 0; + fi + ${RESET_DEVICE} }