AppImage / AppImage/appimage.github.io

Avoid a certain class of potential fails in Shell scripts

Aperta
#267 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
374
Fork
769
Merge medio
4g 10h
PR unite (30g)
8

Descrizione

https://github.com/AppImage/appimage.github.io/blob/7c9d05f632ac1cfd9e128ab7c6be31ffa6c91e73/code/worker.sh#L97

Re-writing this line as

if [ x$TYPE == x2 ] ; then

avoids Travis error messages like *"code/worker.sh: line 97: [: -eq: unary operator expected"* in case $TYPE is empty.

Same is true for https://github.com/AppImage/appimage.github.io/blob/7c9d05f632ac1cfd9e128ab7c6be31ffa6c91e73/code/worker.sh#L118

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.