Skip to content

Commit

Permalink
ssh-tpm-add: include the description in the add output
Browse files Browse the repository at this point in the history
Signed-off-by: Morten Linderud <morten@linderud.pw>
  • Loading branch information
Foxboron committed Jan 5, 2025
1 parent bbe6a94 commit 9b4d2ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/ssh-tpm-add/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func main() {
)); err != nil {
log.Fatal(err)
}
fmt.Printf("Identity added: %s\n", path)
fmt.Printf("Identity added: %s (%s)\n", path, k.Description)

certStr := fmt.Sprintf("%s-cert.pub", strings.TrimSuffix(path, filepath.Ext(path)))
if _, err := os.Stat(certStr); !errors.Is(err, os.ErrNotExist) {
Expand All @@ -151,7 +151,7 @@ func main() {
)); err != nil {
log.Fatal(err)
}
fmt.Printf("Identity added: %s\n", certStr)
fmt.Printf("Identity added: %s (%s)\n", certStr, k.Description)
}

}
Expand Down

0 comments on commit 9b4d2ae

Please sign in to comment.