Skip to content

Commit

Permalink
ssh-tpm-add: ensure we can add keys
Browse files Browse the repository at this point in the history
Signed-off-by: Morten Linderud <[email protected]>
  • Loading branch information
Foxboron committed Aug 8, 2024
1 parent 0c68627 commit 29f7adb
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 @@ -47,7 +47,7 @@ func main() {
flag.StringVar(&user, "user", "", "remote ssh user")
flag.Parse()

if (caURL == "" || host == "" || user == "") || len(os.Args) == 1 {
if (caURL == "" || host == "" || user == "") && len(os.Args) == 1 {
fmt.Println(usage)
return
}
Expand Down Expand Up @@ -89,7 +89,7 @@ func main() {
fmt.Printf("Identity added from CA authority: %s\n", caURL)
}

if len(os.Args) == 1 {
if len(os.Args) != 1 {
path := os.Args[1]

b, err := os.ReadFile(path)
Expand Down

0 comments on commit 29f7adb

Please sign in to comment.