Prevent require
executing some scripts
This commit is contained in:
parent
8a807dcd7a
commit
987abe7773
@ -7,6 +7,7 @@ if ENV["HOMEBREW_STACKPROF"]
|
||||
end
|
||||
|
||||
raise "HOMEBREW_BREW_FILE was not exported! Please call bin/brew directly!" unless ENV["HOMEBREW_BREW_FILE"]
|
||||
raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__
|
||||
|
||||
std_trap = trap("INT") { exit! 130 } # no backtrace thanks
|
||||
|
||||
|
@ -4,6 +4,8 @@
|
||||
# This script is loaded by formula_installer as a separate instance.
|
||||
# Thrown exceptions are propagated back to the parent process over a pipe
|
||||
|
||||
raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__
|
||||
|
||||
old_trap = trap("INT") { exit! 130 }
|
||||
|
||||
require_relative "global"
|
||||
|
@ -1,6 +1,8 @@
|
||||
# typed: strict
|
||||
# frozen_string_literal: true
|
||||
|
||||
raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__
|
||||
|
||||
old_trap = trap("INT") { exit! 130 }
|
||||
|
||||
require_relative "global"
|
||||
|
@ -1,6 +1,8 @@
|
||||
# typed: false
|
||||
# frozen_string_literal: true
|
||||
|
||||
raise "#{__FILE__} must not be loaded via `require`." if $PROGRAM_NAME != __FILE__
|
||||
|
||||
old_trap = trap("INT") { exit! 130 }
|
||||
|
||||
require_relative "global"
|
||||
|
Loading…
x
Reference in New Issue
Block a user