While working on #92 I uncovered a bug with how Tapestry identifies command line input. Because Tapestry needs to know the current environment and working directory for the purpose of loading the work space configuration and therefore its kernel (if configured) outside of the console Application, it also isn't aware of command specific input definitions, again because it's looking at the Input before the service providers execute.
This means that when executing build --json which is entirely valid input for the build command, the Symfony console class ArgvInput would throw a RuntimeException because --json doesn't exist within the default definition.
To get around the issue I have created an Input class that filters any input not present in the default definition so that Tapestry can gather --env and --site-dir options without throwing the option does not exist error.
Because of the Symfony core's use of private methods, this required a lot more code that it otherwise would have.
While working on #92 I uncovered a bug with how Tapestry identifies command line input. Because Tapestry needs to know the current environment and working directory for the purpose of loading the work space configuration and therefore its kernel (if configured) outside of the console Application, it also isn't aware of command specific input definitions, again because it's looking at the Input before the service providers execute.
This means that when executing
build --json
which is entirely valid input for the build command, the Symfony console classArgvInput
would throw aRuntimeException
because--json
doesn't exist within the default definition.To get around the issue I have created an Input class that filters any input not present in the default definition so that Tapestry can gather
--env
and--site-dir
options without throwing the option does not exist error.Because of the Symfony core's use of private methods, this required a lot more code that it otherwise would have.