voxl-send-command exit status implementation request
-
Super super low priority but I noticed that voxl-send-command doesn't output a return code. Even on an error can look like a success since echo will return exit status 0. This is particularly frustrating when an error does actually occur.
Here is a fix below:
if [ -p "/run/mpa/${1}/control" ]; then _CONTROL_FILE="/run/mpa/${1}/control" shift echo "$@" >> "$_CONTROL_FILE" echo "Successfully sent command to ${_CONTROL_FILE}" exit 0 elif [ -p "${1}/control" ]; then _CONTROL_FILE="${1}/control" shift echo "$@" >> "$_CONTROL_FILE" echo "Successfully sent command to ${_CONTROL_FILE}" exit 0 else echo "Unable to find valid pipe that accepts control commands at: ${1}" exit 1 fiWould love to see an update here!
Also side note: Let me know if this is the proper channel so submit code issues like these.
-
@jameskuesel Feel free to make the change and submit a PR
-
Sorry my bad! Done!
-
@jameskuesel Thanks! Merged