On Thu, Nov 09, 2023 at 07:30:01AM +0100, Patrick Steinhardt wrote: > On Thu, Nov 09, 2023 at 02:43:02AM +0900, Junio C Hamano wrote: > > Jeff King <peff@xxxxxxxx> writes: [snip] > > By default, Subversion executes hook scripts with an empty > > environment—that is, no environment variables are set at all, not even > > $PATH (or %PATH%, under Windows). Because of this, many administrators > > are baffled when their hook program runs fine by hand, but doesn't > > work when invoked by Subversion. Administrators have historically > > worked around this problem by manually setting all the environment > > variables their hook scripts need in the scripts themselves. > > So it's not an issue of the environment, but rather an implementation > detail of how Subversion hooks work. It's surprising that this does not > fail on other platforms -- maybe the shell has a default PATH there that > allow us to locate basename(1)? I dunno. Yup, that's in fact it. Bash falls back to a default PATH that can be queried via getconf(1p), and this works alright on most platforms. Not on NixOS though. Patrick
Attachment:
signature.asc
Description: PGP signature