mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-11-22 15:12:06 +01:00
Throw IncompatibleOptions error for sign --as=clearsigned --no-armor
This commit is contained in:
parent
6d28a7b07d
commit
17b305924c
3 changed files with 11 additions and 0 deletions
|
@ -41,6 +41,11 @@ public class InlineSignCmd extends AbstractSopCmd {
|
|||
InlineSign inlineSign = throwIfUnsupportedSubcommand(
|
||||
SopCLI.getSop().inlineSign(), "inline-sign");
|
||||
|
||||
if (!armor && type == InlineSignAs.clearsigned) {
|
||||
String errorMsg = getMsg("sop.error.usage.incompatible_options.clearsigned_no_armor");
|
||||
throw new SOPGPException.IncompatibleOptions(errorMsg);
|
||||
}
|
||||
|
||||
if (type != null) {
|
||||
try {
|
||||
inlineSign.mode(type);
|
||||
|
|
|
@ -32,6 +32,8 @@ usage.exitCodeList.15=69:Unsupported subcommand
|
|||
usage.exitCodeList.16=71:Unsupported special prefix (e.g. \"@ENV/@FD\") of indirect parameter
|
||||
usage.exitCodeList.17=73:Ambiguous input (a filename matching the designator already exists)
|
||||
usage.exitCodeList.18=79:Key is not signing capable
|
||||
usage.exitCodeList.19=83:Options were supplied that are incompatible with each other
|
||||
usage.exitCodeList.20=89:The requested profile is unsupported, or the indicated subcommand does not accept profiles
|
||||
|
||||
## SHARED RESOURCES
|
||||
stacktrace=Print stacktrace
|
||||
|
@ -73,6 +75,7 @@ sop.error.usage.password_or_cert_required=At least one password file or cert fil
|
|||
sop.error.usage.argument_required=Argument '%s' is required.
|
||||
sop.error.usage.parameter_required=Parameter '%s' is required.
|
||||
sop.error.usage.option_requires_other_option=Option '%s' is requested, but no option %s was provided.
|
||||
sop.error.usage.incompatible_options.clearsigned_no_armor=Options '--no-armor' and '--as=clearsigned' are incompatible.
|
||||
# Feature Support
|
||||
sop.error.feature_support.subcommand_not_supported=Subcommand '%s' is not supported.
|
||||
sop.error.feature_support.option_not_supported=Option '%s' not supported.
|
|
@ -32,6 +32,8 @@ usage.exitCodeList.15=69:Nicht unterst
|
|||
usage.exitCodeList.16=71:Nicht unterstützter Spezialprefix (z.B.. "@ENV/@FD") von indirektem Parameter
|
||||
usage.exitCodeList.17=73:Mehrdeutige Eingabe (ein Dateiname, der dem Bezeichner entspricht, existiert bereits)
|
||||
usage.exitCodeList.18=79:Schlüssel ist nicht fähig zu signieren
|
||||
usage.exitCodeList.19=83:Miteinander inkompatible Optionen spezifiziert
|
||||
usage.exitCodeList.20=89:Das angeforderte Profil wird nicht unterstützt, oder der angegebene Unterbefehl akzeptiert keine Profile
|
||||
|
||||
## SHARED RESOURCES
|
||||
stacktrace=Stacktrace ausgeben
|
||||
|
@ -72,6 +74,7 @@ sop.error.usage.password_or_cert_required=Es wird mindestens ein Passwort und/od
|
|||
sop.error.usage.argument_required=Argument '%s' ist erforderlich.
|
||||
sop.error.usage.parameter_required=Parameter '%s' ist erforderlich.
|
||||
sop.error.usage.option_requires_other_option=Option '%s' wurde angegeben, jedoch kein Wert für %s.
|
||||
sop.error.usage.incompatible_options.clearsigned_no_armor=Optionen '--no-armor' und '--as=clearsigned' sind inkompatibel.
|
||||
# Feature Support
|
||||
sop.error.feature_support.subcommand_not_supported=Unterbefehl '%s' wird nicht unterstützt.
|
||||
sop.error.feature_support.option_not_supported=Option '%s' wird nicht unterstützt.
|
Loading…
Reference in a new issue