Skip to content

Make CLI argument parsing stricter #1404

@DennisGaida

Description

@DennisGaida

Expected behaviour:

When working with the CLI arguments that are not allowed at the current position should throw an error.

flexget execute --tasks super_duper_task --test should not be allowed as --test pertains to flexget not to the execute action.

Actual behaviour:

flexget execute --tasks super_duper_task --test is allowed (--test being at the wrong position) and doesn't throw an error.
In this case the test DB is not created which isn't optimal if you want to test things out...

Steps to reproduce:

  • Run flexget execute --tasks super_duper_task --test
  • (╯°□°)╯︵ ┻━┻ because you just destroyed your database with the super_duper_task
  • Should have known to put --test right after flexget

Additional information:

  • Flexget Version: 2.3.25
  • Python Version: 2.7.12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions