geoffroy-aubry/Supervisor

Issue encountered while overseeing a script that expects an exact number of arguments.

gletournel opened this issue · 0 comments

When trying to run the supervisor with a script that expects at least one argument,
execution fails because of additional arguments added by the Supervisor.

For example, when running this command line:

$ supervisor.sh --mail-to=john@doe.me "/path-to-my-symfony-project/app/console" "cache:warmup"

The Symfony console script fails with the following error message:


  [RuntimeException]   
  Too many arguments.  

cache:warmup [--no-optional-warmers]

Actually the Symfony console requires that the exact number of expected arguments are passed to the command line. Otherwise a runtime exception is thrown.

Would it be possible to conditionally include the additional parameters so that user can choose whether or not he wants to use them in his overseen script?

As an example, we could imagine that the following option may indicate the chosen mode.

--extra-parameters
    Enables you to append extra parameters in addition of script parameters.