HomePhorge

(#14060) Fix quoting of commands to interpolate inside the shell.
74e462f58474Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#14060) Fix quoting of commands to interpolate inside the shell.

The shell exec provider was supposed to emulate the behaviour of 0.25 exec,
which was to pass the content through the default shell to get it executed.

Unfortunately, it got quoting a bit wrong, and ended up interpolating
variables at the wrong point - it used double quotes where single quotes were
really what was desired.

Thanks to Matthew Byng-Maddick for the report, and a fix to the quoting; in
the end we should not be in this position - we shouldn't be using string
execution where we can pass an array instead. That avoids any chance that
there is more than one round of shell interpolation entirely.

As a bonus, this fixes the base exec type to support specifying the command to
run that very way, and making it good.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
Matthaus Litteken <matthaus@puppetlabs.com>Committed on Apr 23 2012, 11:08 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU796a0721f83e: Modernize the style of the shell exec provider tests.
Branches
Unknown
Tags
Unknown

Event Timeline

Matthaus Litteken <matthaus@puppetlabs.com> committed rPU74e462f58474: (#14060) Fix quoting of commands to interpolate inside the shell. (authored by Daniel Pittman <daniel@puppetlabs.com>).Apr 23 2012, 11:08 PM