mirror of https://github.com/docker/docs.git
Generic Driver - Check key in PreCheck
Signed-off-by: David Gageot <david@gageot.net>
This commit is contained in:
parent
5caed51a00
commit
7d6bfffb8f
|
|
@ -96,6 +96,14 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) PreCreateCheck() error {
|
||||
if _, err := os.Stat(d.SSHKey); os.IsNotExist(err) {
|
||||
return fmt.Errorf("Ssh key does not exist: %q", d.SSHKey)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (d *Driver) Create() error {
|
||||
log.Info("Importing SSH key...")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue