jeffsf / pyDE1

Controller for the Decent Espresso DE1
GNU General Public License v3.0
77 stars 16 forks source link

pyde1-disconnect-btid.sh error #15

Closed a112358132134 closed 2 years ago

a112358132134 commented 2 years ago

On Manjaro (Arch-based) I've encountered the following issue with pyde1-disconnect-btid.sh.

From journalctl:

Jan 10 18:00:19 de1server pyde1[3285]: /usr/local/bin/pyde1-disconnect-btid.sh: line 18: return: can only `return' from a function or sourced script

To correct this, I altered line 18 to exit rather than return.

I assume this is not a problem on debian?

Regardless, I'm happy to write up a short doc with all the modifications to the installation scripts and services to reflect Arch if you would like that.

jeffsf commented 2 years ago

(un-)amusingly, it's not picked up by shellcheck.

POSIX states that the use is "undefined".

At least dash, bash-as-sh, and FreeBSD sh accept it without error or message as "return to the caller".