lib/beaker/command.rb in beaker-2.18.1 vs lib/beaker/command.rb in beaker-2.18.2

- old
+ new

@@ -195,10 +195,10 @@ # (only applies to solaris hosts, they don't provide the -i option) # # @return a new {SedCommand} object def initialize platform, expression, filename, opts = {} command = "sed -i -e \"#{expression}\" #{filename}" - if platform =~ /solaris|aix|osx/ + if platform =~ /solaris|aix|osx|openbsd/ command.slice! '-i ' temp_file = opts[:temp_file] ? opts[:temp_file] : "#{filename}.tmp" command << " > #{temp_file} && mv #{temp_file} #{filename} && rm -f #{temp_file}" end args = []