Skip to content

Commit 1610707

Browse files
author
Matthew Fisher
committed
fix(builder): properly escape backticks
1 parent 3591348 commit 1610707

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

builder/image/templates/builder

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ if [ ! -f Dockerfile ]; then
113113
BUILD_OPTS+=' deis/slugbuilder'
114114

115115
# build the application and attach to the process
116-
JOB=$(eval $(parse-string "${BUILD_OPTS[@]}") )
116+
JOB=$(eval '$(parse-string "${BUILD_OPTS[@]}")' )
117117
docker attach $JOB
118118

119119
# copy out the compiled slug

tests/config_test.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ var (
1313
configSetCmd = "config:set FOO=讲台 --app={{.AppName}}"
1414
configSet2Cmd = "config:set FOO=10 --app={{.AppName}}"
1515
configSet3Cmd = "config:set POWERED_BY=\"the Deis team\" --app={{.AppName}}"
16+
configSet4Cmd = "config:set CAR='`star' --app={{.AppName}}"
1617
configUnsetCmd = "config:unset FOO --app={{.AppName}}"
1718
)
1819

@@ -44,6 +45,9 @@ func configSetup(t *testing.T) *utils.DeisTestConfig {
4445
// ensure envvars with spaces work fine on `git push`
4546
// https://github.com/deis/deis/issues/2477
4647
utils.Execute(t, configSet3Cmd, cfg, false, "the Deis team")
48+
// ensure envvars with backticks work too
49+
// https://github.com/deis/deis/issues/2980
50+
utils.Execute(t, configSet4Cmd, cfg, false, "`star")
4751
utils.Execute(t, gitPushCmd, cfg, false, "")
4852
utils.CurlWithFail(t, cfg, false, "the Deis team")
4953
if err := utils.Chdir(".."); err != nil {
@@ -59,13 +63,13 @@ func configListTest(
5963

6064
func configSetTest(t *testing.T, params *utils.DeisTestConfig) {
6165
utils.Execute(t, configSetCmd, params, false, "讲台")
62-
utils.CheckList(t, appsInfoCmd, params, "(v4)", false)
63-
utils.Execute(t, configSet2Cmd, params, false, "10")
6466
utils.CheckList(t, appsInfoCmd, params, "(v5)", false)
67+
utils.Execute(t, configSet2Cmd, params, false, "10")
68+
utils.CheckList(t, appsInfoCmd, params, "(v6)", false)
6569
}
6670

6771
func configUnsetTest(t *testing.T, params *utils.DeisTestConfig) {
6872
utils.Execute(t, configUnsetCmd, params, false, "")
69-
utils.CheckList(t, appsInfoCmd, params, "(v6)", false)
73+
utils.CheckList(t, appsInfoCmd, params, "(v7)", false)
7074
utils.CheckList(t, "run env --app={{.AppName}}", params, "FOO", true)
7175
}

0 commit comments

Comments
 (0)