Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hook arguments #2184

Closed
1 task done
webcompas opened this issue May 13, 2024 · 3 comments
Closed
1 task done

Support hook arguments #2184

webcompas opened this issue May 13, 2024 · 3 comments

Comments

@webcompas
Copy link

Welcome

  • Yes, I've searched similar issues on GitHub and didn't find any.

How do you use lego?

Binary

Detailed Description

At the moment lego doesn't support hook commands with arguments. This can lead to a huge number of scripts (or other workarounds) despite they just differ by one little thing (for example a user or application id).
If one could simply provide such information as an argument to the hook command this would make it much easier and reduce management efforts.

I would therefore very much welcome the support of arguments.

@ldez ldez added the area/cli label May 13, 2024
@ldez
Copy link
Member

ldez commented May 13, 2024

Hello,

lego already supports CLI arguments:

lego ... renew --renew-hook 'echo foo'

Note: quotes inside the hook command are not supported.

Do you have a concrete example?

@ldez ldez added the question label May 13, 2024
@webcompas
Copy link
Author

webcompas commented May 14, 2024

Note: quotes inside the hook command are not supported.
Do you have a concrete example?

Thanks for this hint. I really tried to use a quoted string as argument. So the minimum solution would be to improve the documentation accordingly. Currently it doesn't mention arguments at all and even worse there's no warning about the unsupported quotes (see also #1468).

In addition there may be situations where a quoted string is needed (e.g. because of spaces or other special characters) or at least useful. So the better solution would be to support quotes and also improve the documentation accordingly.

@ldez
Copy link
Member

ldez commented May 14, 2024

I explained the situation here: #2168 (comment)

I agree that the documentation should be improved, so I flag your issue as a duplicate of #1468

@ldez ldez closed this as completed May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants