feat: update age cli

This commit is contained in:
2023-03-25 08:14:51 +08:00
parent 7e90e281b0
commit 2009984976
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
package me.hatter.tools.tinyencrypt.config;
public class TinyEncryptConstant {
public static final String VERSION = "0.6.2";
public static final String VERSION = "0.6.3";
public static final String ENC_FILE_EXT = ".tinyenc";
}

View File

@@ -28,7 +28,7 @@ public class AgeCliUtil {
final RFile recipientAgeFileWithoutSerial = RFile.fromUserHome(".tinyencrypt/" + ageRecipient + ".age");
final RFile recipientAgeFileWithSerial = serialOpt.map(s -> RFile.fromUserHome(".tinyencrypt/" + ageRecipient + ".age." + s)).orElse(null);
final RFile recipientAgeFile = (recipientAgeFileWithSerial != null && recipientAgeFileWithSerial.isFile())
final RFile recipientAgeFile = ((recipientAgeFileWithSerial != null) && recipientAgeFileWithSerial.isFile())
? recipientAgeFileWithSerial : recipientAgeFileWithoutSerial;
AssertUtil.isTrue(recipientAgeFile.isFile(), "Age key file required");