We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06b6842 commit ae1f0b4Copy full SHA for ae1f0b4
cmd/podman/system/connection/add.go
@@ -141,6 +141,14 @@ func add(cmd *cobra.Command, args []string) error {
141
142
switch uri.Scheme {
143
case "ssh":
144
+ // ensure the Identity provided is a valid file
145
+ info, err := os.Stat(entities.Identity)
146
+ switch {
147
+ case err != nil:
148
+ return err
149
+ case info.IsDir():
150
+ return fmt.Errorf("%q is a directory", entities.Identity)
151
+ }
152
return ssh.Create(entities, sshMode)
153
case "unix":
154
if cmd.Flags().Changed("identity") {
0 commit comments