Skip to content

Commit

Permalink
fixed path errors on windows, replaced filepath w/ path
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron-prindle committed Sep 14, 2017
1 parent e6da47f commit 4dd8a5e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/provision/buildroot.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,13 @@ func configureAuth(p *BuildrootProvisioner) error {

execRunner := &bootstrapper.ExecRunner{}
hostCerts := map[string]string{
authOptions.CaCertPath: filepath.Join(authOptions.StorePath, "ca.pem"),
authOptions.ClientCertPath: filepath.Join(authOptions.StorePath, "cert.pem"),
authOptions.ClientKeyPath: filepath.Join(authOptions.StorePath, "key.pem"),
authOptions.CaCertPath: path.Join(authOptions.StorePath, "ca.pem"),
authOptions.ClientCertPath: path.Join(authOptions.StorePath, "cert.pem"),
authOptions.ClientKeyPath: path.Join(authOptions.StorePath, "key.pem"),
}

for src, dst := range hostCerts {
f, err := assets.NewFileAsset(src, filepath.Dir(dst), filepath.Base(dst), "0777")
f, err := assets.NewFileAsset(src, path.Dir(dst), filepath.Base(dst), "0777")
if err != nil {
return errors.Wrapf(err, "open cert file: %s", src)
}
Expand Down Expand Up @@ -244,7 +244,7 @@ func configureAuth(p *BuildrootProvisioner) error {
}
sshRunner := bootstrapper.NewSSHRunner(sshClient)
for src, dst := range remoteCerts {
f, err := assets.NewFileAsset(src, filepath.Dir(dst), filepath.Base(dst), "0640")
f, err := assets.NewFileAsset(src, path.Dir(dst), filepath.Base(dst), "0640")
if err != nil {
return errors.Wrapf(err, "error copying %s to %s", src, dst)
}
Expand Down

0 comments on commit 4dd8a5e

Please sign in to comment.