If you make it exec $@, then your $ script will replace itself with the command, which will make it return the same exit code as the command you ran with it.
Your implementation will always exit 0 and suppress any exit code from what it runs, causing other scripts to think that things succeeded even when they fail.
If you make it
exec $@
, then your$
script will replace itself with the command, which will make it return the same exit code as the command you ran with it.Your implementation will always exit
0
and suppress any exit code from what it runs, causing other scripts to think that things succeeded even when they fail.That's great feedback. Thanks Joe, I'll update and edit the post!