[darcs-users] darcs remove command

Allan Clark a.d.clark at ed.ac.uk
Fri Jul 6 12:19:02 UTC 2007


Hi Eric, thanks for the reply:

Eric S Fraga wrote:
> On Fri, Jul 06, 2007 at 09:12:14AM +0100, Allan Clark wrote:
>   
>> Oh yes this is already in my ~/.bashrc, otherwise I wouldn't be able to 
>> run darcs when normally logged in (ie. when I am actually at work). The 
>> problem is that a non-interactive shell doesn't run ~/.bashrc (at least 
>> not on the setup here).
>>     
>
> Allan,
>
> are you sure about this? 
Most definitely not, I'm not sure about many things ;)
My statement that it wasn't run, was based purely on the fact that my 
path symbol wasn't set.

>  many default .bashrc files have a premature
> exit if not being executed from a non-interactive shell (to avoid the
> effort of setting up aliases, say, when not needed). if that is the
> case, you should be able to set the PATH variable _before_ the
> premature exit.
>
> for instance, in my .bashrc file, I have the following:
>
> # ------------------------------------ start snippet -----------------
> # before anything else, set all the environment variables just in case
> . ~/.bash_env
>
> # If not running interactively, don't do anything:
> [ -z "$PS1" ] && return
> #
> # aliases etc follow
> # ------------------------------------ end snippet -------------------
>
> and I set all my environment variables, not just PATH, in a separate
> .bash_env file (for convenience).
>
> hope this helps!
>   

This seems like a good suggestion. Our setup here is quite unorthodox.
It is so done to provide a way of doing automatic configuration on all 
of the machines across our school,
it is a research project, or at least was at one time.
Anyway I got the impression that user environments for non-interactive 
shells were broken, but not intentionally and that a fix might occur 
sometime in the future. In the meantime the patch allowing me to set the 
remote command in darcs was I think three lines or so, hence it was much 
quicker to do this.

I'll certainly update my dot files as you suggest and see what happens, 
thanks for the suggestion.

regards
allan





More information about the darcs-users mailing list