mirror of
https://codeberg.org/PGPainless/sop-java.git
synced 2024-12-22 04:57:56 +01:00
ArmorCMD: Drop --label option
This commit is contained in:
parent
03cabdf3fb
commit
802bc0aa73
1 changed files with 0 additions and 14 deletions
|
@ -6,9 +6,7 @@ package sop.cli.picocli.commands
|
|||
|
||||
import java.io.IOException
|
||||
import picocli.CommandLine.Command
|
||||
import picocli.CommandLine.Option
|
||||
import sop.cli.picocli.SopCLI
|
||||
import sop.enums.ArmorLabel
|
||||
import sop.exception.SOPGPException.BadData
|
||||
import sop.exception.SOPGPException.UnsupportedOption
|
||||
|
||||
|
@ -18,21 +16,9 @@ import sop.exception.SOPGPException.UnsupportedOption
|
|||
exitCodeOnInvalidInput = UnsupportedOption.EXIT_CODE)
|
||||
class ArmorCmd : AbstractSopCmd() {
|
||||
|
||||
@Option(names = ["--label"], paramLabel = "{auto|sig|key|cert|message}")
|
||||
var label: ArmorLabel? = null
|
||||
|
||||
override fun run() {
|
||||
val armor = throwIfUnsupportedSubcommand(SopCLI.getSop().armor(), "armor")
|
||||
|
||||
label?.let {
|
||||
try {
|
||||
armor.label(it)
|
||||
} catch (unsupported: UnsupportedOption) {
|
||||
val errorMsg = getMsg("sop.error.feature_support.option_not_supported", "--label")
|
||||
throw UnsupportedOption(errorMsg, unsupported)
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
val ready = armor.data(System.`in`)
|
||||
ready.writeTo(System.out)
|
||||
|
|
Loading…
Reference in a new issue