fix if statement and condition

This commit is contained in:
Joshua Seidel 2015-07-08 15:09:17 -04:00
parent 6e21ca50a0
commit 7f4a5ac413

View File

@ -348,7 +348,7 @@ func (p *Provisioner) deployConfigFiles(
return fmt.Errorf("Uploading %s failed: %v", validationKey, err) return fmt.Errorf("Uploading %s failed: %v", validationKey, err)
} }
if p.SecretKeyPath != nil if p.SecretKeyPath != ""
{ {
// Open the secret key file // Open the secret key file
f, err := os.Open(p.SecretKeyPath) f, err := os.Open(p.SecretKeyPath)
@ -361,6 +361,7 @@ func (p *Provisioner) deployConfigFiles(
if err := comm.Upload(path.Join(confDir, secretKey), f); err != nil { if err := comm.Upload(path.Join(confDir, secretKey), f); err != nil {
return fmt.Errorf("Uploading %s failed: %v", secretKey, err) return fmt.Errorf("Uploading %s failed: %v", secretKey, err)
} }
return
} }
// Make strings.Join available for use within the template // Make strings.Join available for use within the template