fac icon indicating copy to clipboard operation
fac copied to clipboard

Update loop stops on first held mod that is updatable

Open NopeDK opened this issue 5 years ago • 2 comments

Held mods update block uses break where it should use continue like the unpacked block.

                if not args.held and local_mod.name in self.config.hold:
                    print("%s is held. "
                          "Use -H to update it anyway." %
                          local_mod.name)
                    break

The above should use break like the on below does. Links above link to the relevant lines.

                if not args.unpacked and not local_mod.packed:
                    print(
                        "%s is unpacked. "
                        "Use -U to update it anyway." % (
                            local_mod.name
                        )
                    )
                    continue

NopeDK avatar May 20 '19 15:05 NopeDK

It's the last line in the for loop, so it doesn't need a continue. Removing the line entirely seems fine.

Really, I suppose the answer is to break up the function.

Baughn avatar Jun 17 '19 19:06 Baughn

I am talking about the break at line 64, not the last line (67).

The break at 64 cancels the update function on the first package that can be updated but is held.

And yes, the very last break at line 67 shouldn't be there as well as that also ends the loop prematurely.

NopeDK avatar Jun 17 '19 19:06 NopeDK