From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-914002-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 450941395E2
	for <garchives@archives.gentoo.org>; Mon, 28 Nov 2016 22:19:56 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id E5977E083A;
	Mon, 28 Nov 2016 22:19:53 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id C9CEBE083A
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Nov 2016 22:19:53 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id CC5173413E9
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Nov 2016 22:19:52 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id D2B4B332
	for <gentoo-commits@lists.gentoo.org>; Mon, 28 Nov 2016 22:19:50 +0000 (UTC)
From: "Austin English" <wizardedit@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Austin English" <wizardedit@gentoo.org>
Message-ID: <1480361233.4d7da7ac603f610fef687ea95357e7b727b19d03.wizardedit@gentoo>
Subject: [gentoo-commits] proj/eselect-java:master commit in: src/scripts/
X-VCS-Repository: proj/eselect-java
X-VCS-Files: src/scripts/run-java-tool.bash.in
X-VCS-Directories: src/scripts/
X-VCS-Committer: wizardedit
X-VCS-Committer-Name: Austin English
X-VCS-Revision: 4d7da7ac603f610fef687ea95357e7b727b19d03
X-VCS-Branch: master
Date: Mon, 28 Nov 2016 22:19:50 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: e1ea5ed4-e48a-47a8-9a70-21845300cdda
X-Archives-Hash: 7743790b9b3bda1d7b28e6153e0ae867

commit:     4d7da7ac603f610fef687ea95357e7b727b19d03
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 28 19:23:43 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Mon Nov 28 19:27:13 2016 +0000
URL:        https://gitweb.gentoo.org/proj/eselect-java.git/commit/?id=4d7da7ac

src/scripts/run-java-tool.bash.in: replace `which` with `command -v`

which is an external binary and may not be installed on all systems.
command is a shell builtin, and more likely to be available.

Based on a patch by Manuel RĂ¼ger <mrueg <AT> gentoo.org>

Gentoo-Bug: https://bugs.gentoo.org/599392

 src/scripts/run-java-tool.bash.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/scripts/run-java-tool.bash.in b/src/scripts/run-java-tool.bash.in
index 2587fee..67e4dba 100644
--- a/src/scripts/run-java-tool.bash.in
+++ b/src/scripts/run-java-tool.bash.in
@@ -26,7 +26,7 @@ toolpath=$(
 	export PATH=
 	. "@GENTOO_PORTAGE_EPREFIX@/usr/share/java-config-2/vm/${vm_handle}" 2> /dev/null
 	: ${PATH:=${vmpath}/bin:${vmpath}/jre/bin}
-	"@GENTOO_PORTAGE_EPREFIX@/usr/bin/which" "${tool}" 2> /dev/null
+	command -v "${tool}" 2> /dev/null
 )
 
 if [ -x "${toolpath}" ]; then