Sha256: 10f3aaf0d6dfbfaff4d2fb28c1edc1e1da5bcca2be5b9585a298e14f94655015

Contents?: true

Size: 300 Bytes

Versions: 5

Compression:

Stored size: 300 Bytes

Contents

module Sprinkle
  module Sudo

    def sudo_cmd
      return "#{@delivery.try(:sudo_command) || "sudo"} " if sudo?
    end

    def sudo?
      sudo_stack.detect { |x| x==true or x==false }
    end

    def sudo_stack
      [ options[:sudo], package.sudo?, @delivery.try(:sudo?) ]
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
sprinkle-0.7.7 lib/sprinkle/extensions/sudo.rb
sprinkle-0.7.6.2 lib/sprinkle/extensions/sudo.rb
sprinkle-0.7.6.1 lib/sprinkle/extensions/sudo.rb
sprinkle-0.7.6 lib/sprinkle/extensions/sudo.rb
sprinkle-0.7.5 lib/sprinkle/extensions/sudo.rb