This code can never work because -j is a option and must be set before any args. Also the list ruleset part does not make sense in this case.
I think the code should a always add -j first and then only add "list", "ruleset" if args are None. If args are set they should be added after -j.
I am not sure how args are supped to be used with get_current_ruleset(), I like to dump all the rule for a specifc table name which can be done with something like
nft -j list table inet <table name>
however due the args parsing it is impossible to supply this as the default args are allays appended, see https://github.com/namib-project/nftables-rs/blob/173d1bdc002627e223f128b0d210aa281051ecab/src/helper.rs#L46-L53This code can never work because
-j
is a option and must be set before any args. Also the list ruleset part does not make sense in this case. I think the code should a always add-j
first and then only add"list", "ruleset"
if args are None. If args are set they should be added after-j
.