Check that HOMEBREW_TEMP permits executing programs
This commit is contained in:
parent
3e890c11ad
commit
4adbfa3fcf
@ -17,6 +17,23 @@ module Homebrew
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_tmpdir_executable
|
||||||
|
f = Tempfile.new(%w[homebrew_check_tmpdir_executable .sh], HOMEBREW_TEMP)
|
||||||
|
f.write "#!/bin/sh\n"
|
||||||
|
f.chmod 0700
|
||||||
|
f.close
|
||||||
|
return if system f.path
|
||||||
|
<<~EOS.undent
|
||||||
|
The directory #{HOMEBREW_TEMP} does not permit executing
|
||||||
|
programs. It is likely mounted as "noexec". Please set HOMEBREW_TEMP
|
||||||
|
in your #{shell_profile} to a different directory, for example:
|
||||||
|
export HOMEBREW_TEMP=~/tmp
|
||||||
|
echo 'export HOMEBREW_TEMP=~/tmp' >> #{shell_profile}
|
||||||
|
EOS
|
||||||
|
ensure
|
||||||
|
f.unlink
|
||||||
|
end
|
||||||
|
|
||||||
def check_xdg_data_dirs
|
def check_xdg_data_dirs
|
||||||
return if ENV["XDG_DATA_DIRS"].to_s.empty?
|
return if ENV["XDG_DATA_DIRS"].to_s.empty?
|
||||||
return if ENV["XDG_DATA_DIRS"].split("/").include?(HOMEBREW_PREFIX/"share")
|
return if ENV["XDG_DATA_DIRS"].split("/").include?(HOMEBREW_PREFIX/"share")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user