Skip to content

Commit ba548c3

Browse files
authored
replace double quotes with single quotes (#49)
1 parent 942b35a commit ba548c3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packer-provisioner-goss.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ func (p *Provisioner) inline_vars() string {
441441
if err == nil {
442442
switch p.config.TargetOs {
443443
case windows:
444-
// don't include single quotes which confused cmd parsing
445-
return fmt.Sprintf("--vars-inline %s", string(inlineVarsJson))
444+
// don't include single quotes around the json string and replace " with ' otherwise the variables are not recognised
445+
return fmt.Sprintf("--vars-inline %s", strings.Replace(string(inlineVarsJson), "\"", "'", -1))
446446
default:
447447
return fmt.Sprintf("--vars-inline '%s'", string(inlineVarsJson))
448448
}

0 commit comments

Comments
 (0)