Skip to content

Commit

Permalink
Print error if no files are given on ssh import
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Jun 3, 2024
1 parent 1c9bf61 commit f7e1cae
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cli/cmd/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ var importSSHCmd = &cobra.Command{
Short: "Imports an SSH key into your vault",
Long: `Imports an SSH key into your vault.`,
Run: func(cmd *cobra.Command, args []string) {
if len(args) == 0 {
fmt.Println("Error: No filename for SSH key specified")
return
}

filename := args[0]
fmt.Println("Importing SSH key from " + filename)

Expand Down

0 comments on commit f7e1cae

Please sign in to comment.