view src/which.sh @ 32088:cdab211f342a v9.0.1375

patch 9.0.1375: crash when getting member of obj of unknown class Commit: https://github.com/vim/vim/commit/f77a7f704ffd0ca1050e82f609c8b8bd61863277 Author: Ernie Rael <errael@raelity.com> Date: Fri Mar 3 15:05:30 2023 +0000 patch 9.0.1375: crash when getting member of obj of unknown class Problem: Crash when getting member of obj of unknown class. Solution: Check for NULL class and give an error message. (Ernie Rael, closes #12096)
author Bram Moolenaar <Bram@vim.org>
date Fri, 03 Mar 2023 16:15:03 +0100
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