Re: execlineb -S does not stop the command from running
Jesse Young (2018-07-29 12:19): |> >$ 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. Oh, I see the usefulness of this for debbuging until right and then using strict when the script is ready. | That switch already exists :). Running execlineb with -W gets the desired result: | $ execlineb -WS1 -c 'echo wrong' | execlineb: fatal: too few arguments: expecting at least 1 but got Thanks! This does what what I want. | I would think this would be equivalent: | $ EXECLINE_STRICT=2 execlineb -S1 -c 'echo wrong' | however, it reverts back to showing a warning. Are the command line option taking precendence? The EXECLINE_STRICT option is not set explicitly on the command line however.
Re: execlineb -S does not stop the command from running
`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
execlineb -S does not stop the command from running
Hi there, First of all, thanks for this fine and useful software on skaware. I'm using execline v2.5.0.0 (and 7ce423). I've tried to use the -S1 option to stop the command from running when not given any arguments. `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 ``` I've found the commit that introduces the error: ``` $ git bisect good 0294fb779bb603046da8ef1755d227553e93a881 is the first bad commit ``` However, that commit does not change execlineb and i'm lost at the codebase. What could have introduced the error?