diff options
author | Bryan Kearney <bkearney@redhat.com> | 2009-02-12 09:32:01 -0500 |
---|---|---|
committer | Bryan Kearney <bkearney@redhat.com> | 2009-03-04 16:51:08 -0500 |
commit | 9d36b5833ceef954181d5d281aba08d414fcdb65 (patch) | |
tree | ba2f7aa83867df21768a8dd986ca96bc2e1960a6 | |
parent | 61661b1c46fafeabf1bdbc4778762831d7178d91 (diff) | |
download | puppet-9d36b5833ceef954181d5d281aba08d414fcdb65.tar.gz puppet-9d36b5833ceef954181d5d281aba08d414fcdb65.tar.xz puppet-9d36b5833ceef954181d5d281aba08d414fcdb65.zip |
Bug 1948: Added patch by jab to support the correct ins syntax. Updated the test cases as well
-rw-r--r-- | lib/puppet/provider/augeas/augeas.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/puppet/provider/augeas/augeas.rb b/lib/puppet/provider/augeas/augeas.rb index 8d4f6d55a..f70654438 100644 --- a/lib/puppet/provider/augeas/augeas.rb +++ b/lib/puppet/provider/augeas/augeas.rb @@ -178,14 +178,12 @@ Puppet::Type.type(:augeas).provide(:augeas) do debug("sending command '#{command}' with params #{cmd_array.inspect}") aug.clear(cmd_array[0]) when "insert", "ins" - - ext_array = cmd_array[1].split(" ") ; - if cmd_array.size < 2 or ext_array.size < 2 + if cmd_array.size < 3 fail("ins requires 3 parameters") end label = cmd_array[0] - where = ext_array[0] - path = File.join(context, ext_array[1]) + where = cmd_array[1] + path = File.join(context, cmd_array[2]) case where when "before": before = true when "after": before = false |