Skip to content

Add status check to lego migrate #3165

@udf2457

Description

@udf2457

Welcome

  • Yes, I'm using a binary release or the library within the two latest releases.
  • Yes, I've searched for similar issues on GitHub and didn't find any.

Detailed Description

I currently have some scheduled lego v4 automation scripts that I want to convert into dual-use v4 / v5 scripts.

As far as I can tell from the docs there is no "status" option for lego migrate.

This means that my scheduled scripts would be unable to gracefully handle a scenario where the lego binary has been updated (for whatever reason, the why/how part is irrelevant) to v5 but there is existing v4 directory structure in-place (again, for whatever reason, the why/how part is irrelevant).

Clearly I do not want my script to blindly run lego migrate. Instead I would like to gracefully exit and notify/log.

Effective version of lego

5.2.2

How do you use lego?

Binary

In which context are you using lego?

Personal use

🌱 Supporting the Maintainers

  • Yes, I find this project useful, and I appreciate the work done by the maintainers.
  • Yes, I have starred this repository to help others find it.
  • Yes, I have sponsored this project to keep the project stable and maintained.

Confirmation

  • Yes, I've included all the information above (version, usage, etc.).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions