Jeff King <peff@xxxxxxxx> writes: > ... But the more robust way to do it is: > > # export ORIG_PATH, which presumably is not cleared the same way PATH > # is, so that the hook can access it > ORIG_PATH=$PATH && > export ORIG_PATH && > > cat >"$hook" <<EOF > # pull the original path from the caller > PATH=$ORIG_PATH > export PATH > > ...do other stuff... > EOF > > That's assuming that environment variables make it intact to the hook at > all (it is not clear to me why the original $PATH doesn't). Yeah, the parenthetical comment points at the crux of the issue. I can tell from the patch what issue the platform throws at us we are trying to work around, but it is frustrating not to know why the platform does such unpleasant things in the first place. Thanks.