acquire icon indicating copy to clipboard operation
acquire copied to clipboard

`--no-history` isn't respected

Open OlafHaalstra opened this issue 11 months ago • 1 comments

When you run acquire with acquire --profile full --no-history the history module is not ignored

Expected behaviour I would expect that the history module would be ignored if you specify --no-history

OlafHaalstra avatar Jan 29 '25 14:01 OlafHaalstra

This is likely because of the wrong order of processing the module arguments here: https://github.com/fox-it/acquire/blob/2c0092bc8fd064d7f50ae6618e2166967fd8b839/acquire/acquire.py#L1764-L1784

We only ever add to the modules selected from the arguments (never checking for False and removing from it). On top, we process arguments first, and then update it with the modules from the profile.

The order should be swapped (add from profile first, then process arguments), and then check for explicit False arguments (set by --no-<module> and remove them from the selected modules.

Schamper avatar Jan 30 '25 09:01 Schamper