Skip to content

Commit 55f1187

Browse files
committed
keyctl: improve some errors
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 8f31891 commit 55f1187

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keyctl/keyctl_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func (k Keyctl) createDefaultPersistentKeyring() (string, error) {
3535
cmd.Stdout = &out
3636
err := cmd.Run()
3737
if err != nil {
38-
return "", fmt.Errorf("cannot run keyctl command to create persistent keyring: %s: %w", errout.String(), err)
38+
return "", fmt.Errorf("cannot run keyctl command (%s) to create persistent keyring: %s: %w", cmd.String(), errout.String(), err)
3939
}
4040
persistentKeyringID := out.String()
4141
if err != nil {
@@ -64,7 +64,7 @@ func (k Keyctl) getDefaultCredsStoreFromPersistent() (keyctl.NamedKeyring, error
6464
cmd.Stderr = &errout
6565
err := cmd.Run()
6666
if err != nil {
67-
return nil, fmt.Errorf("cannot run keyctl command to created credstore keyring (%s): %s %s: %w", cmd.String(), errout.String(), out.String(), err)
67+
return nil, fmt.Errorf("cannot run keyctl command to create credstore keyring (%s): %s %s: %w", cmd.String(), errout.String(), out.String(), err)
6868
}
6969
}
7070
// Search for it again and return the default keyring

0 commit comments

Comments
 (0)