Skip to content

Commit 4be3a1a

Browse files
authored
Merge pull request #203589 from Homebrew/util-linux-use-bash-completion-arg
util-linux: use `--with-bashcompletiondir` to install completions
2 parents 62d7b4a + c261d52 commit 4be3a1a

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Formula/u/util-linux.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class UtilLinux < Formula
6565
end
6666

6767
def install
68-
args = %w[--disable-silent-rules --disable-asciidoc]
68+
args = %W[--disable-silent-rules --disable-asciidoc --with-bashcompletiondir=#{bash_completion}]
6969

7070
if OS.mac?
7171
# Support very old ncurses used on macOS 13 and earlier
@@ -82,7 +82,6 @@ def install
8282
args << "--disable-use-tty-group" # Fix chgrp: changing group of 'wall': Operation not permitted
8383
args << "--disable-kill" # Conflicts with coreutils.
8484
args << "--without-systemd" # Do not install systemd files
85-
args << "--with-bashcompletiondir=#{bash_completion}"
8685
args << "--disable-chfn-chsh"
8786
args << "--disable-login"
8887
args << "--disable-su"
@@ -92,13 +91,8 @@ def install
9291
args << "--without-python"
9392
end
9493

95-
system "./configure", *args, *std_configure_args.reject { |s| s["--disable-debug"] }
94+
system "./configure", *args, *std_configure_args
9695
system "make", "install"
97-
98-
# install completions only for installed programs
99-
Pathname.glob("bash-completion/*") do |prog|
100-
bash_completion.install prog if (bin/prog.basename).exist? || (sbin/prog.basename).exist?
101-
end
10296
end
10397

10498
def caveats

0 commit comments

Comments
 (0)