Merge pull request #1329 from OpsRockin/chef-local-paths-on-windows

Fix remotePaths when provisioning Linux from Windows
Fixes #394
This commit is contained in:
Ross Smith II 2014-07-11 07:19:22 -07:00
commit dab4d7824b
2 changed files with 4 additions and 4 deletions

View File

@ -286,7 +286,7 @@ func (p *Provisioner) createConfig(ui packer.Ui, comm packer.Communicator, nodeN
return "", err return "", err
} }
remotePath := filepath.Join(p.config.StagingDir, "client.rb") remotePath := filepath.ToSlash(filepath.Join(p.config.StagingDir, "client.rb"))
if err := comm.Upload(remotePath, bytes.NewReader([]byte(configString))); err != nil { if err := comm.Upload(remotePath, bytes.NewReader([]byte(configString))); err != nil {
return "", err return "", err
} }
@ -315,7 +315,7 @@ func (p *Provisioner) createJson(ui packer.Ui, comm packer.Communicator) (string
} }
// Upload the bytes // Upload the bytes
remotePath := filepath.Join(p.config.StagingDir, "first-boot.json") remotePath := filepath.ToSlash(filepath.Join(p.config.StagingDir, "first-boot.json"))
if err := comm.Upload(remotePath, bytes.NewReader(jsonBytes)); err != nil { if err := comm.Upload(remotePath, bytes.NewReader(jsonBytes)); err != nil {
return "", err return "", err
} }

View File

@ -378,7 +378,7 @@ func (p *Provisioner) createConfig(ui packer.Ui, comm packer.Communicator, local
return "", err return "", err
} }
remotePath := filepath.Join(p.config.StagingDir, "solo.rb") remotePath := filepath.ToSlash(filepath.Join(p.config.StagingDir, "solo.rb"))
if err := comm.Upload(remotePath, bytes.NewReader([]byte(configString))); err != nil { if err := comm.Upload(remotePath, bytes.NewReader([]byte(configString))); err != nil {
return "", err return "", err
} }
@ -407,7 +407,7 @@ func (p *Provisioner) createJson(ui packer.Ui, comm packer.Communicator) (string
} }
// Upload the bytes // Upload the bytes
remotePath := filepath.Join(p.config.StagingDir, "node.json") remotePath := filepath.ToSlash(filepath.Join(p.config.StagingDir, "node.json"))
if err := comm.Upload(remotePath, bytes.NewReader(jsonBytes)); err != nil { if err := comm.Upload(remotePath, bytes.NewReader(jsonBytes)); err != nil {
return "", err return "", err
} }