alx-tools / Betty

Holberton-style C code checker written in Perl
GNU General Public License v3.0
1.26k stars 1.77k forks source link

echo $? -> 0 #26

Open Athesto opened 4 years ago

Athesto commented 4 years ago

Hi How are you? I was trying to do a script that use betty, but I need to check if betty throws and error, but with this code, she says that there is an error, but when I check the exit status $? it says that there is no error. Is this a bug?

image

Athesto commented 4 years ago

I think that the problem is with the betty.sh because when i use betty-style it works

vagrant:tmp$ betty main.c; echo $?

========== main.c ==========
main.c:4: ERROR: trailing whitespace
total: 1 errors, 0 warnings, 14 lines checked
main
0
vagrant:tmp$ betty-style main.c; echo $?                 
main.c:4: ERROR: trailing whitespace
total: 1 errors, 0 warnings, 14 lines checked
1
vagrant:tmp$