Move Sandbox check to extend/os
This commit is contained in:
parent
65bce0ed3c
commit
9c2293a08e
9
Library/Homebrew/extend/os/mac/sandbox.rb
Normal file
9
Library/Homebrew/extend/os/mac/sandbox.rb
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# typed: strict
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class Sandbox
|
||||||
|
sig { returns(T::Boolean) }
|
||||||
|
def self.available?
|
||||||
|
File.executable?(SANDBOX_EXEC)
|
||||||
|
end
|
||||||
|
end
|
||||||
4
Library/Homebrew/extend/os/sandbox.rb
Normal file
4
Library/Homebrew/extend/os/sandbox.rb
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# typed: strict
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require "extend/os/mac/sandbox" if OS.mac?
|
||||||
@ -17,7 +17,7 @@ class Sandbox
|
|||||||
|
|
||||||
sig { returns(T::Boolean) }
|
sig { returns(T::Boolean) }
|
||||||
def self.available?
|
def self.available?
|
||||||
OS.mac? && File.executable?(SANDBOX_EXEC)
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { void }
|
sig { void }
|
||||||
@ -256,3 +256,5 @@ class Sandbox
|
|||||||
end
|
end
|
||||||
private_constant :SandboxProfile
|
private_constant :SandboxProfile
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require "extend/os/sandbox"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user