From c06d31965f42d49fe52c0097d8678ffe466b92c1 Mon Sep 17 00:00:00 2001 From: alliasgher Date: Tue, 14 Apr 2026 14:58:37 +0500 Subject: [PATCH] cmd/fscrypt: mention --unlock-with in protector error hint The error hint for ErrSpecifyProtector only referenced --protector, but for the unlock command the correct flag is --unlock-with. Mention both flags so users are pointed to the right one. Fixes #439 Signed-off-by: alliasgher --- cmd/fscrypt/errors.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go index c4814f47..e4da8846 100644 --- a/cmd/fscrypt/errors.go +++ b/cmd/fscrypt/errors.go @@ -272,7 +272,8 @@ func getErrorSuggestions(err error) string { return fmt.Sprintf("If desired, use %s to automatically run destructive operations.", shortDisplay(forceFlag)) case ErrSpecifyProtector: - return fmt.Sprintf("Use %s to specify a protector.", shortDisplay(protectorFlag)) + return fmt.Sprintf("Use %s or %s to specify a protector.", + shortDisplay(protectorFlag), shortDisplay(unlockWithFlag)) case ErrSpecifyKeyFile: return fmt.Sprintf("Use %s to specify a key file.", shortDisplay(keyFileFlag)) case ErrDropCachesPerm: