From 18dddb516b78a4c4ff83adc5e3f6ae4dc9d9a91d Mon Sep 17 00:00:00 2001 From: sawanoboly Date: Fri, 11 Jul 2014 19:12:34 +0900 Subject: [PATCH] Fix remotePaths when provisioning Linux from Windows --- provisioner/chef-client/provisioner.go | 4 ++-- provisioner/chef-solo/provisioner.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/provisioner/chef-client/provisioner.go b/provisioner/chef-client/provisioner.go index 1e2847f54..c880691c3 100644 --- a/provisioner/chef-client/provisioner.go +++ b/provisioner/chef-client/provisioner.go @@ -286,7 +286,7 @@ func (p *Provisioner) createConfig(ui packer.Ui, comm packer.Communicator, nodeN 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 { return "", err } @@ -315,7 +315,7 @@ func (p *Provisioner) createJson(ui packer.Ui, comm packer.Communicator) (string } // 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 { return "", err } diff --git a/provisioner/chef-solo/provisioner.go b/provisioner/chef-solo/provisioner.go index 1e5a47241..2166a9d0c 100644 --- a/provisioner/chef-solo/provisioner.go +++ b/provisioner/chef-solo/provisioner.go @@ -378,7 +378,7 @@ func (p *Provisioner) createConfig(ui packer.Ui, comm packer.Communicator, local 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 { return "", err } @@ -407,7 +407,7 @@ func (p *Provisioner) createJson(ui packer.Ui, comm packer.Communicator) (string } // 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 { return "", err }