add check for DEVICE_PORT being writable

If the user has missed the step about setting up their account
with the right group membership, they would get a cryptic failure
from stty, so catch this and explain the problem.
pull/304/head
Adam Spiers 7 years ago
parent 980d703f5e
commit 6356154bc3

@ -268,6 +268,26 @@ If you see this message, it means that our serial port
detection logic is buggy or incomplete.
Please report this issue at https://github.com/keyboardio/Kaleidoscope
EOF
exit 1
fi
if ! [ -w "$DEVICE_PORT" ]; then
cat <<EOF >&2
$DEVICE_PORT is not writable:
`ls -l $DEVICE_PORT`
You are currently in the following groups:
`id -Gn`
Please ensure you have followed the instructions on setting up your
account to be in the right group:
https://github.com/keyboardio/Kaleidoscope/wiki/Install-Arduino-support-on-Linux
EOF
exit 1
fi

Loading…
Cancel
Save