Description
It seems that addArg is doing more than it should, which is causing the code to be a little complicated. In my use case, I'm doing one of a few things, which vary greatly on how the logic needs to behave:
- Basic key/value pairs -
--file, $tarball
- Arguments only, no values -
--extract
- Values only -
$filename
- Crazy redirects -
-O > $destination
(If it wasn't obvious, my test case here is tar
.) Since there's a lot going on, but not a lot of flexibility, would it make sense to have a few different methods for addArg, for various use cases.
As a list critique point, passing in '--file=', $tarball
looks weird, I feel moving the option for a separator to an argument could make more sense.
Either way, I'm going to monkey patch a local copy I grabbed for a project I'm working on, and can submit my results if you're interested. Otherwise great looking class, the convenience of it handling the necessary proc_* operations is useful.