fixed path errors on windows, replaced filepath w/ path
parent
e6da47f5a1
commit
e575585c2c
|
|
@ -19,7 +19,7 @@ package bootstrapper
|
|||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"path"
|
||||
"sync"
|
||||
|
||||
"github.com/golang/glog"
|
||||
|
|
@ -81,7 +81,7 @@ func (s *SSHRunner) CombinedOutput(cmd string) (string, error) {
|
|||
|
||||
// Copy copies a file to the remote over SSH.
|
||||
func (s *SSHRunner) Copy(f assets.CopyableFile) error {
|
||||
deleteCmd := fmt.Sprintf("sudo rm -f %s", filepath.Join(f.GetTargetDir(), f.GetTargetName()))
|
||||
deleteCmd := fmt.Sprintf("sudo rm -f %s", path.Join(f.GetTargetDir(), f.GetTargetName()))
|
||||
mkdirCmd := fmt.Sprintf("sudo mkdir -p %s", f.GetTargetDir())
|
||||
for _, cmd := range []string{deleteCmd, mkdirCmd} {
|
||||
if err := s.Run(cmd); err != nil {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue