dadoug / gneasy-genkey

Easy GnuPG key generation tool.
GNU General Public License v3.0
62 stars 11 forks source link

Script failure with some options #20

Closed codebrewer closed 7 years ago

codebrewer commented 7 years ago

There's a typo and an omission in the definition of the long options that the script accepts. A missing comma prevents --no-export-sec and --no-paperkey from working and --no-export-sub isn't declared at all:

$ ./gneasy-genkey.sh --no-export-sec "Testy McTesterson testy@mctesterson.test" egk: FATAL: getopt error $ ./gneasy-genkey.sh --no-paperkey "Testy McTesterson testy@mctesterson.test" script exits silently $ ./gneasy-genkey.sh --no-export-sub "Testy McTesterson testy@mctesterson.test" script exits silently

codebrewer commented 7 years ago

Pull request #21 makes the three options work.

I haven't done so, but removing the --quiet option from the invocation of getopt produces output in the case of unrecognized options:

$ ./gneasy-genkey.sh --blah "Testy McTesterson testy@mctesterson.test" gneasy-genkey.sh: unrecognized option '--blah'

Something to consider perhaps.

dadoug commented 7 years ago

I'm in favor of trowing good messages but my memory is that getopt gets noisy/verbose without the --quiet option and my preference was to not have to listen to it ask for a cookie-treat every time it successfully did it's job.

Reflecting now, it seems that my petty preference is likely easily out weighed by the need for the user to have a clear picture of the operations performed.

Thoughts?

codebrewer commented 7 years ago

I guess it's a case of picking the least worst option then... 😐

Or maybe turn getopt's --quiet on/off based on the values of $EGK_QUIET and $EGK_SILENT (although I haven't looked to see what effect those two options have on the script's output)?