mirror of
https://github.com/docker/docs.git
synced 2026-11-05 00:14:17 +03:00
Generic Driver - Check key in PreCheck
Signed-off-by: David Gageot <david@gageot.net>
This commit is contained in:
@@ -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...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user