Skip to content

Commit cd58da7

Browse files
author
Joshua Seidel
committed
remove unused if
1 parent 7f4a5ac commit cd58da7

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

builtin/provisioners/chef/resource_provisioner.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,20 +348,16 @@ func (p *Provisioner) deployConfigFiles(
348348
return fmt.Errorf("Uploading %s failed: %v", validationKey, err)
349349
}
350350

351-
if p.SecretKeyPath != ""
352-
{
353351
// Open the secret key file
354-
f, err := os.Open(p.SecretKeyPath)
352+
s, err := os.Open(p.SecretKeyPath)
355353
if err != nil {
356354
return err
357355
}
358-
defer f.Close()
356+
defer s.Close()
359357

360358
// Copy the secret key to the new instance
361-
if err := comm.Upload(path.Join(confDir, secretKey), f); err != nil {
359+
if err := comm.Upload(path.Join(confDir, secretKey), s); err != nil {
362360
return fmt.Errorf("Uploading %s failed: %v", secretKey, err)
363-
}
364-
return
365361
}
366362

367363
// Make strings.Join available for use within the template

0 commit comments

Comments
 (0)