Git Product home page Git Product logo

Comments (4)

junousi avatar junousi commented on May 10, 2024 1

Aye, just need to figure out is my sh really this rusty or something else going on when trying to feed anything whitespace delimited

/ # export LE_ADDITIONAL_OPTIONS='--version --version'
/ # echo certbot "${LE_ADDITIONAL_OPTIONS}"
certbot --version --version
/ # $(echo certbot "${LE_ADDITIONAL_OPTIONS}")
certbot 1.16.0
/ # certbot "${LE_ADDITIONAL_OPTIONS}" 2>&1 | tail -1
certbot: error: unrecognized arguments: --version --version

Presuming you'd want the last form for the PR and that specifically errors out regardless if it's the --preferred-chain or --version or anything else. /usr/bin/certbot only touches sys.argv[0] not the others so probably not related. Will test more with actual renewals when rate limit has ended.

from nginx-le.

paskal avatar paskal commented on May 10, 2024

The better way is to add LE_ADDITIONAL_OPTIONS, which would allow anything, rather than specifying that option. Feel free to send the PR with the change.

from nginx-le.

junousi avatar junousi commented on May 10, 2024

@paskal now had a chance to look at this properly, and unfortunately I'm struggling to make this work with more complex arguments that may contain whitespace in addition to the delimiter whitespace. Tried various set -- approaches, mangling IFS before processing the input variable with standard sh tooling, and so on. Still basically stuck at certbot: error: unrecognized arguments: --preferred-chain 'ISRG Root X1'.

Just to double check, should one presume that the additional options MUST come from a single whitespace delimited environment variable? Like in the commented out example here.

Pondering would it be more robust to pass these e.g. from a \n delimited string (or file). I'd like to avoid making a PR from anything based on eval if possible, but currently it seems like the easiest approach to let something like eval render the command before feeding it to python.

Another approach could be to implement a dedicated extra options parser, which sorta-kinda-works for me, but probably not for all possible use cases. And even there one would need to further account for mismatched ''' and typos and such in a more robust manner.

from nginx-le.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.