[darcs-users] Re: push --and-apply over ssh uses limited path

Donald Bruce Stewart dons at cse.unsw.edu.au
Mon Mar 1 02:20:55 UTC 2004


sam:
> >>>>> "Donald" == Donald Bruce Stewart <dons at cse.unsw.edu.au> writes:
> 
> Donald> Push --and-apply uses ssh to exec the command 'darcs apply' on
> Donald> the remote system. ssh doesn't execute that command in the
> Donald> shell: it executes it directly, so unless darcs is installed
> Donald> in the system's default PATH, push won't work.
> 
> Donald> We can fix this by executing an ssh "sh -lc darcs" instead, so
> Donald> that users can set up a .profile with any extra environment
> Donald> goo.
> 
> I think this is a very bad idea for several reasons:

>   - "-l" is not a standard sh option (it is not present on my FreeBSD
>     box for example)

Ah! I didn't know that. I wrongly assumed that OpenBSD sh would be a
subset of other sh implementations. We should certainly *not* use the 
-l flag. It was just the first fix that worked for me, after trying
various other zsh/sh/ssh combinations.

>   - if as I guess it means "login shell", this is certainly not the
>     truth here; a login shell is supposed to setup an environment when
>     you log in (such as asking you for your ssh-agent key), it is
>     interactive
> 
> I do not understand why you do not choose a better default shell (zsh
> for example) with your PATH sets in the appropriate file? (.zshenv
> here)

Ahh! .zshenv.

This had entirely eluded me.

Yes. Looks like my patch is redundant.

Cheers,
  Don




More information about the darcs-users mailing list