alphagov/puppet-rbenv — pull request #5 by dcarley (2013-06-19 11:10:47+00:00)
Title: Remove explicit env var strings from unless cmd

It's not necessary to prefix the :unless command with explicit environment
variables. It adopts the settings from :environment in just the same way as
:command. Demonstrated by:

```
➜ puppet git:(master) ✗ b puppet apply
exec { 'should not run':
command => '/bin/echo',
unless => '/bin/bash -c \'[ "$FOO" == "foo" ]\'',
environment => "FOO=foo",
}
exec { 'should run':
command => '/bin/echo',
onlyif => '/bin/bash -c \'[ "$FOO" == "foo" ]\'',
environment => "FOO=foo",
}
^D
notice: /Stage[main]//Exec[should run]/returns: executed successfully
notice: Finished catalog run in 0.15 seconds
```

Because of this we no longer need to use `provider => shell` either.

I don't recall why my previous test of this made me think it was necessary.
Thanks @philandstuff for the prompt to re-investigate.

--

Will need rebasing against #4, or vice versa.