File tree Expand file tree Collapse file tree
builtin/provisioners/chef Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments