Code Monkey home page Code Monkey logo

Comments (6)

djmitche avatar djmitche commented on August 16, 2024

And, probably related:

[[email protected] ~]#  eyaml -e --pkcs7-private-key /etc/hiera/keys/private_key.pem -k /etc/hiera/keys/public_key.pem  -o block -p  'root_pw_hash!loaner'
Error: option '-k' specified multiple times.
Try --help for help.

from hiera-eyaml.

djmitche avatar djmitche commented on August 16, 2024

Using exclusivley the long options seems to work fine.

from hiera-eyaml.

sihil avatar sihil commented on August 16, 2024

This is to do with the way that we specify and merge together the command line options map. When the CLI is started it has a standard set of options and then pulls in other options from the encryption modules (such as PKCS7 and GPG). This is clearly non-deterministic. Even if it were deterministic it would change when different sets of encryption modules were installed.

The easiest solution to this is to eliminate all short options for non-core options (we can do this by setting the short option to :none when building the trollop options). Another solution would be to hard code the short options in the encryption modules, although then you'd have to co-ordinate between the different encryption modules. I'd prefer the former (I've already removed some short options in pull request #28).

from hiera-eyaml.

djmitche avatar djmitche commented on August 16, 2024

I agree that short => :none is the best choice, then.

from hiera-eyaml.

sihil avatar sihil commented on August 16, 2024

I think that this will have been solved with the merge of #56 (when a new gem is cut anyway). What's the behaviour of this now @gtmtech - is this ready to be closed?

from hiera-eyaml.

gtmtech avatar gtmtech commented on August 16, 2024

The v2.0 code now defaults to short => :none, and only adds it explicitly back in if its been specified. In addition the ordering of options is much more specific - and is an array which is iterated over directly within the Trollop block. This should prevent future occurrences of this problem.

I am marking this as now fixed-closed

from hiera-eyaml.

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.