Re: execlineb -S does not stop the command from running

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Sun, 29 Jul 2018 13:50:03 +0000

>`execline` does indeed exits when not given arguments, and displays the
>error `execlineb: warning: too few arguments: expecting at least 1 but
>got 0` but the first command gets run.
>
>```
>$ execlineb -S1 -c 'echo wrong'
>execlineb: warning: too few arguments: expecting at least 1 but got 0
>wrong
>```

  It's not an error, it's actually a bugfix. As you can see, the message
is a "warning", not a "fatal", which means it does not stop the
program from running. It has always been intended this way.
  If you want to enforce a minimal number of arguments and exit if
that number is not reached, you have to do it from inside the script
with something like "if { test $# -ge 1 }".

  That said, it's probably useful functionality for the execlineb
binary to have, so I'll consider having a switch implementing it
for a future version.

--
  Laurent
Received on Sun Jul 29 2018 - 13:50:03 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC