view src/which.sh @ 25761:e855eba4ac39 v8.2.3416

patch 8.2.3416: second error is reported while exception is being thrown Commit: https://github.com/vim/vim/commit/36f691f5f1d0676f080cc97d697d742ed5cc8251 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 8 15:33:30 2021 +0200 patch 8.2.3416: second error is reported while exception is being thrown Problem: Second error is reported while exception is being thrown. Solution: Do not check for trailing characters when already aborting. (closes #8842)
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Sep 2021 15:45:03 +0200
parents 3fc0f57ecb91
children
line wrap: on
line source

#! /bin/sh
#
# which.sh -- find where an executable is located.  It's here because the
# "which" command is not supported everywhere.  Used by Makefile.

IFS=":"
for ac_dir in $PATH; do
	if test -f "$ac_dir/$1"; then
		echo "$ac_dir/$1"
		break
	fi
done