Open Fractaos opened 4 months ago
The problem is that as soon as there is a not defined argument the bind will throw and stop parsing the other args.
If I remember correctly the reason for this behaviour has something to do with sharing common configs over the commands.
@dbrumann, @patrickkusebauch Am I right?
A quick fix would be to use $input->getParameterOption('--config-file')
instead of $input->getOption('config-file')
;
Maybe just revert this commit: https://github.com/qossmic/deptrac-src/commit/703b21247a620f465cb0b45dab996b3201316313 ?
Tested on: 2.0.1
Hello, while doing some tests on a project, I figured out that somehow, when placing the flag
--report-uncovered
(or--fail-on-uncovered
) before specifying the configuration file through the--config-file
option, this last one is ignored anddeptrac
tries to use the default configuration file instead.The problem doesn't occur for the
--no-cache
flag for instance but I've not tested the other ones.Examples:
Running
tools/vendor/bin/deptrac analyze --config-file=deptrac_hexagonal.yaml --report-uncovered
will works properly, with the following output:But running
tools/vendor/bin/deptrac analyze --report-uncovered --config-file=deptrac_hexagonal.yaml
will give me an error due todeptrac.yml
not being found:For additional information, I tested the same operation on another project where
qossmic/deptrac-shim:1.0.2
is installed instead and it seems to work without any issue.