Skip to content

Commit

Permalink
feat: rename {expand,print}_path to {expand,print}_env
Browse files Browse the repository at this point in the history
  • Loading branch information
d12frosted committed Aug 25, 2024
1 parent c7ec2d2 commit 0aeb4b2
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ class EmacsPlusAT28 < EmacsBase
#
def initialize(*args, **kwargs, &block)
a = super
expand_path
expand_env
a
end

Expand All @@ -116,7 +116,7 @@ def initialize(*args, **kwargs, &block)
#

def install
expand_path
expand_env

args = %W[
--disable-dependency-tracking
Expand Down
4 changes: 2 additions & 2 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class EmacsPlusAT29 < EmacsBase
#
def initialize(*args, **kwargs, &block)
a = super
expand_path
expand_env
a
end

Expand All @@ -111,7 +111,7 @@ def initialize(*args, **kwargs, &block)
#

def install
expand_path
expand_env

args = %W[
--disable-dependency-tracking
Expand Down
10 changes: 5 additions & 5 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ class EmacsPlusAT30 < EmacsBase
#
def initialize(*args, **kwargs, &block)
a = super
print_path if verbose?
expand_path if build.with? "path-injection"
print_path if verbose?
print_env if verbose?
expand_env if build.with? "path-injection"
print_env if verbose?
a
end

Expand All @@ -123,8 +123,8 @@ def initialize(*args, **kwargs, &block)
#

def install
expand_path if build.with? "path-injection"
print_path if verbose?
expand_env if build.with? "path-injection"
print_env if verbose?

args = %W[
--disable-dependency-tracking
Expand Down
12 changes: 7 additions & 5 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ class EmacsPlusAT31 < EmacsBase
#
def initialize(*args, **kwargs, &block)
a = super
print_path if verbose?
expand_path if build.with? "path-injection"
print_path if verbose?
print_env if verbose?
expand_env if build.with? "path-injection"
print_env if verbose?
a
end

Expand All @@ -123,8 +123,8 @@ def initialize(*args, **kwargs, &block)
#

def install
expand_path if build.with? "path-injection"
print_path if verbose?
expand_env if build.with? "path-injection"
print_env if verbose?

args = %W[
--disable-dependency-tracking
Expand Down Expand Up @@ -157,6 +157,8 @@ def install
ENV.append "LDFLAGS", "-I#{Formula["libgccjit"].include}"
end

print_env if verbose?

args <<
if build.with? "dbus"
"--with-dbus"
Expand Down
6 changes: 3 additions & 3 deletions Library/EmacsBase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def inject_path
system "touch '#{app}'"
end

def expand_path
def expand_env
# Expand PATH to include all dependencies and Superenv.bin as
# dependencies can override standard tools.
path = PATH.new()
Expand All @@ -81,14 +81,14 @@ def expand_path
ENV['PATH'] = path.existing

if verbose?
print_path
print_env
system "which", "tar"
system "which", "ls"
system "which", "grep"
end
end

def print_path
def print_env
path = PATH.new()
path.append(ENV['PATH'])
puts "PATH value is"
Expand Down

0 comments on commit 0aeb4b2

Please sign in to comment.