Sha256: 6c9040674e88867276148b1d6740b703c2d9413786fe3ea954330e955a26cb8f
Contents?: true
Size: 581 Bytes
Versions: 6
Compression:
Stored size: 581 Bytes
Contents
class Specinfra::Command::Windows::Base::File < Specinfra::Command::Windows::Base class << self def check_is_owned_by(file, owner) Backend::PowerShell::Command.new do exec "if((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}' -or ((Get-Item '#{file}').GetAccessControl().Owner -match '#{owner}').Length -gt 0){ exit 0 } else { exit 1 }" end end end end class Specinfra::Command::Base::File < Specinfra::Command::Base class << self def get_content(file) "cat '#{file}' 2> /dev/null || echo -n" end end end
Version data entries
6 entries across 6 versions & 1 rubygems