Skip to content

Commit

Permalink
keyctl: improve some errors
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Aug 21, 2022
1 parent 15a284a commit 4b932f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keyctl/keyctl_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (k Keyctl) createDefaultPersistentKeyring() (string, error) {
cmd.Stdout = &out
err := cmd.Run()
if err != nil {
return "", fmt.Errorf("cannot run keyctl command to create persistent keyring: %s: %w", errout.String(), err)
return "", fmt.Errorf("cannot run keyctl command (%s) to create persistent keyring: %s: %w", cmd.String(), errout.String(), err)
}
persistentKeyringID := out.String()
if err != nil {
Expand Down Expand Up @@ -64,7 +64,7 @@ func (k Keyctl) getDefaultCredsStoreFromPersistent() (keyctl.NamedKeyring, error
cmd.Stderr = &errout
err := cmd.Run()
if err != nil {
return nil, fmt.Errorf("cannot run keyctl command to created credstore keyring (%s): %s %s: %w", cmd.String(), errout.String(), out.String(), err)
return nil, fmt.Errorf("cannot run keyctl command to create credstore keyring (%s): %s %s: %w", cmd.String(), errout.String(), out.String(), err)
}
}
// Search for it again and return the default keyring
Expand Down

0 comments on commit 4b932f7

Please sign in to comment.