Skip to content
Snippets Groups Projects
Commit a02be9ee authored by Mike McQuaid's avatar Mike McQuaid Committed by GitHub
Browse files

ENV: move to new paths. (#507)

Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
  all superenv wrappers and all symlinks to the same version. We never needed
  the "separate shims for separate versions" functionality and it just adds
  confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
  things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
  used by or related to superenv (or stdenv) in any way.
parent de366f71
No related branches found
No related tags found
No related merge requests found
Showing
with 6 additions and 6 deletions
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
......@@ -12,7 +12,7 @@ TEST_TMPDIR = ENV.fetch("HOMEBREW_TEST_TMPDIR") { |k|
# Paths pointing into the Homebrew code base that persist across test runs
HOMEBREW_LIBRARY_PATH = Pathname.new(File.expand_path("../../..", __FILE__))
HOMEBREW_ENV_PATH = HOMEBREW_LIBRARY_PATH.parent+"ENV"
HOMEBREW_SHIMS_PATH = HOMEBREW_LIBRARY_PATH.parent+"Homebrew/shims"
HOMEBREW_LOAD_PATH = [File.expand_path("..", __FILE__), HOMEBREW_LIBRARY_PATH].join(":")
# Paths redirected to a temporary directory and wiped at the end of the test run
......
module Utils
def self.git_available?
return @git if instance_variable_defined?(:@git)
@git = quiet_system HOMEBREW_ENV_PATH/"scm/git", "--version"
@git = quiet_system HOMEBREW_SHIMS_PATH/"scm/git", "--version"
end
def self.git_path
return unless git_available?
@git_path ||= Utils.popen_read(
HOMEBREW_ENV_PATH/"scm/git", "--homebrew=print-path"
HOMEBREW_SHIMS_PATH/"scm/git", "--homebrew=print-path"
).chuzzle
end
def self.git_version
return unless git_available?
@git_version ||= Utils.popen_read(
HOMEBREW_ENV_PATH/"scm/git", "--version"
HOMEBREW_SHIMS_PATH/"scm/git", "--version"
).chomp[/git version (\d+(?:\.\d+)*)/, 1]
end
......
......@@ -55,7 +55,7 @@ begin
end
# Add SCM wrappers.
ENV["PATH"] += "#{File::PATH_SEPARATOR}#{HOMEBREW_ENV_PATH}/scm"
ENV["PATH"] += "#{File::PATH_SEPARATOR}#{HOMEBREW_SHIMS_PATH}/scm"
if cmd
internal_cmd = require? HOMEBREW_LIBRARY_PATH.join("cmd", cmd)
......
......@@ -29,7 +29,7 @@ brew() {
}
git() {
"$HOMEBREW_LIBRARY/ENV/scm/git" "$@"
"$HOMEBREW_LIBRARY/Homebrew/shims/scm/git" "$@"
}
# Force UTF-8 to avoid encoding issues for users with broken locale settings.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment