[darcs-devel] Exporting env vars to the posthook
Nathaniel Gray
n8gray at caltech.edu
Thu Aug 31 14:37:57 PDT 2006
Juliusz Chroboczek wrote:
>>>> that changing the method used to execute the posthook from
>>>> System.Cmd.system to System.Process.runProcess will break any posthook
>>>> command that counts on being processed by the shell.
>
>> I don't like this new restriction.
>
> I agree with Jason here. Any chance this could be fixed?
Without a doubt, but I don't know how to do it portably. One way would
be to use System.Posix.Env.putEnv to put the vars into darcs'
environment before calling System.Cmd.system, but System.Posix.Env is
described as non-portable in the ghc docs.
Another way would be to use runProcess with the equivalent of "$SHELL -c
'<posthook-cmd>'" but I don't know how to translate that to Windows.
If there's a similar construct in Windows that would be ideal, since it
ducks the really tedious issues associated with parsing command lines.
So basically we need a little windows expertise to decide how to proceed.
Cheers,
-n8
--
>>>-- Nathaniel Gray -- Caltech Computer Science ------>
>>>-- Mojave Project -- http://mojave.cs.caltech.edu -->
More information about the darcs-devel
mailing list