aboutsummaryrefslogtreecommitdiff
path: root/cmd/fscrypt/prompt.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/fscrypt/prompt.go')
-rw-r--r--cmd/fscrypt/prompt.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/cmd/fscrypt/prompt.go b/cmd/fscrypt/prompt.go
index 0031e8f..d34a18a 100644
--- a/cmd/fscrypt/prompt.go
+++ b/cmd/fscrypt/prompt.go
@@ -90,7 +90,7 @@ func askConfirmation(question string, defaultChoice bool, warning string) error
// Defaults of "no" require forcing.
if !defaultChoice {
if quietFlag.Value {
- return ErrNoDesctructiveOps
+ return ErrNoDestructiveOps
}
}
@@ -185,7 +185,7 @@ func promptForSource(ctx *actions.Context) error {
}
// We print all the sources with their number, description, and name.
- fmt.Println("Your data can be protected with one of the following sources:")
+ fmt.Println("The following protector sources are available:")
for idx := 1; idx < len(metadata.SourceType_value); idx++ {
source := metadata.SourceType(idx)
description := sourceDescriptions[source]
@@ -282,7 +282,8 @@ func promptForProtector(options []*actions.ProtectorOption) (int, error) {
}
if numLoadErrors > 0 {
- fmt.Print(wrapText("NOTE: %d of the %d protectors failed to load. "+loadHelpText, 0))
+ loadWarning := fmt.Sprintf("NOTE: %d of the %d protectors failed to load. ", numLoadErrors, numOptions)
+ fmt.Print(wrapText(loadWarning+loadHelpText, 0) + "\n")
}
for {
@@ -318,7 +319,8 @@ func optionFn(policyDescriptor string, options []*actions.ProtectorOption) (int,
return idx, nil
}
}
- return 0, actions.ErrNotProtected
+ return 0, &actions.ErrNotProtected{PolicyDescriptor: policyDescriptor,
+ ProtectorDescriptor: protector.Descriptor()}
}
log.Printf("optionFn(%s)", policyDescriptor)