view src/which.sh @ 25763:5e7c96e9036d v8.2.3417

patch 8.2.3417: Vim9: a failing debug expression aborts script sourcing Commit: https://github.com/vim/vim/commit/072f1c68884a1e2d468a0f39e27fc28168fb4b03 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Sep 8 20:40:34 2021 +0200 patch 8.2.3417: Vim9: a failing debug expression aborts script sourcing Problem: Vim9: a failing debug expression aborts script sourcing. Solution: Do not let expression failure abort script sourcing. (closes https://github.com/vim/vim/issues/8848)
author Bram Moolenaar <Bram@vim.org>
date Wed, 08 Sep 2021 20: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