Skip to content

Commit

Permalink
Merge pull request #2777 from hashicorp/b-2686-dont-escape-env
Browse files Browse the repository at this point in the history
rkt: use %s instead of %q when interpolating env
  • Loading branch information
schmichael committed Jul 5, 2017
2 parents e1ab0bf + 80436f7 commit fb96b86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ BUG FIXES:
* client/config: Use `cpu_total_compute` whenever it is set [GH-2745]
* driver/exec: Properly set file/dir ownership in chroots [GH-2552]
* driver/docker: Fix panic in Docker driver on Windows [GH-2614]
* driver/rkt: Fix env var interpolation [GH-2777]
* server: Reject non-TLS clients when TLS enabled [GH-2525]
* server: Fix a panic in plan evaluation with partial failures and all_at_once
set [GH-2544]
Expand Down
2 changes: 1 addition & 1 deletion client/driver/rkt.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (*StartResponse,

// Inject environment variables
for k, v := range ctx.TaskEnv.Map() {
cmdArgs = append(cmdArgs, fmt.Sprintf("--set-env=%v=%q", k, v))
cmdArgs = append(cmdArgs, fmt.Sprintf("--set-env=%s=%s", k, v))
}

// Check if the user has overridden the exec command.
Expand Down

0 comments on commit fb96b86

Please sign in to comment.