Move Sandbox check to extend/os

This commit is contained in:
apainintheneck 2022-11-20 14:27:28 -08:00
parent 65bce0ed3c
commit 9c2293a08e
3 changed files with 16 additions and 1 deletions

View 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

View File

@ -0,0 +1,4 @@
# typed: strict
# frozen_string_literal: true
require "extend/os/mac/sandbox" if OS.mac?

View File

@ -17,7 +17,7 @@ class Sandbox
sig { returns(T::Boolean) }
def self.available?
OS.mac? && File.executable?(SANDBOX_EXEC)
false
end
sig { void }
@ -256,3 +256,5 @@ class Sandbox
end
private_constant :SandboxProfile
end
require "extend/os/sandbox"