[darcs-devel] [issue1733] Darcs assumes $HOME is absolute

Trent W. Buck bugs at darcs.net
Mon Jan 18 08:30:38 UTC 2010


New submission from Trent W. Buck <trentbuck at gmail.com>:

This is probably a "not worth fixing", but I noticed that Darcs seems
to just *ASSUME* $HOME is an absolute path.  Couple with its use of
chdir(2) to the repo root before doing anything, this results in a
failure:

    $ with-temp-dir sh -c 'HOME=. darcs get http://code.haskell.org/yi'
    with-temp-dir: entering directory `/tmp/with-temp-dir.x6ukO5'
    darcs:
    ./.darcs/cache/pristine.hashed/0000000931-848fba01e3390b4e9ac197f3712bd018b592a61b13be6180a3469957d1ea08e8-new_c2c8459d74b10fb739a6f62f34ff2245:
    renameFile: does not exist (No such file or directory)
    [...]

If I use $PWD instead of ., it works:

    $ with-temp-dir sh -c 'HOME=$PWD darcs get http://code.haskell.org/yi'
    with-temp-dir: entering directory `/tmp/with-temp-dir.QIqjJL'
    Copying patches, to get lazy repository hit ctrl-C...
    Copying patches 55/4117
    [...]

----------
messages: 9843
nosy: darcs-devel, dmitry.kurochkin, twb
status: unknown
title: Darcs assumes $HOME is absolute

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1733>
__________________________________


More information about the darcs-devel mailing list