Skip to content

Commit

Permalink
Merge pull request #2570 from svanharmelen/b-provisioner-chef-version
Browse files Browse the repository at this point in the history
provisioner/chef: fixes issue #2568
  • Loading branch information
Sander van Harmelen committed Jun 30, 2015
2 parents 282e139 + 3d03f4b commit 5798034
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion builtin/provisioners/chef/linux_provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (p *Provisioner) linuxInstallChefClient(
}

// Then execute the install.sh scrip to download and install Chef Client
err = p.runCommand(o, comm, fmt.Sprintf("%sbash ./install.sh -v %s", prefix, p.Version))
err = p.runCommand(o, comm, fmt.Sprintf("%sbash ./install.sh -v %q", prefix, p.Version))
if err != nil {
return err
}
Expand Down
10 changes: 5 additions & 5 deletions builtin/provisioners/chef/linux_provisioner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {

Commands: map[string]bool{
"sudo curl -LO https://www.chef.io/chef/install.sh": true,
"sudo bash ./install.sh -v ": true,
"sudo bash ./install.sh -v \"\"": true,
"sudo rm -f install.sh": true,
},
},
Expand All @@ -41,7 +41,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {

Commands: map[string]bool{
"curl -LO https://www.chef.io/chef/install.sh": true,
"bash ./install.sh -v ": true,
"bash ./install.sh -v \"\"": true,
"rm -f install.sh": true,
},
},
Expand All @@ -59,7 +59,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {

Commands: map[string]bool{
"proxy_http='http://proxy.local' curl -LO https://www.chef.io/chef/install.sh": true,
"proxy_http='http://proxy.local' bash ./install.sh -v ": true,
"proxy_http='http://proxy.local' bash ./install.sh -v \"\"": true,
"proxy_http='http://proxy.local' rm -f install.sh": true,
},
},
Expand All @@ -80,7 +80,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {
"proxy_http='http://proxy.local' no_proxy='http://local.local,http://local.org' " +
"curl -LO https://www.chef.io/chef/install.sh": true,
"proxy_http='http://proxy.local' no_proxy='http://local.local,http://local.org' " +
"bash ./install.sh -v ": true,
"bash ./install.sh -v \"\"": true,
"proxy_http='http://proxy.local' no_proxy='http://local.local,http://local.org' " +
"rm -f install.sh": true,
},
Expand All @@ -99,7 +99,7 @@ func TestResourceProvider_linuxInstallChefClient(t *testing.T) {

Commands: map[string]bool{
"curl -LO https://www.chef.io/chef/install.sh": true,
"bash ./install.sh -v 11.18.6": true,
"bash ./install.sh -v \"11.18.6\"": true,
"rm -f install.sh": true,
},
},
Expand Down

0 comments on commit 5798034

Please sign in to comment.