public inbox for goredo-devel@lists.stargrave.org
Atom feed
From: Rafael Fourquet <fourquet.rafael@gmail•com>
To: goredo-devel@lists.cypherpunks.su
Subject: Re: goredo gets confused with relative paths and symlinks
Date: Fri, 24 Oct 2025 15:45:30 +0200 [thread overview]
Message-ID: <CAJoaZ9KgYGydJH_aRApWULjzqmN8a3Gv2Q25NZv47N9DLRJ_iQ@mail.gmail.com> (raw)
In-Reply-To: <aPttSuJF93Bm5-bP@stargrave.org>
Thanks for answering!
> Here your message seems to be cut for some reason.
> There are no exact examples.
The archive seems to have it:
http://lists.cypherpunks.su/archive/goredo-devel/CAJoaZ9Lv3VL0B_hqzZWSd4FUGr3bOZVyDhWE2F2ie1OsqGRZ-g@mail.gmail.com/
> Questions and problems with symlinks were raised a while ago in that
> maillist and I remember that basically they are not solvable in general
> case. spacefrogg's advice not to use symlinks is best we can do.
I understand, and am fine with avoiding symlinks within my "redo projects".
But I will always have symlinks somewhere else, and when I call redo from
one of these paths containing symlinks, it would be a small QOL improvement
if that would work out of the box.
> As I can see, Access() will be called only if do-file is found. It
> should return earlier if it was not. Or maybe symlinks completely breaks
> absolute/relative paths resolution and indeed it deals with different
> views to the same file?
It seems that's exactly what happens. The do file was determined to exist
(and `doFile.a` does indeed exist, and is executable), but
the `Access()` call is done on `doFile.rel`, which does not exist in the context
of my example.
So `Access()` was meant to determine whether the file is
executable, but it returns an error because the file was inexistant.
Adding debug statements in the code reveals:
` unix.Access returned error: no such file or directory`
with this line added in the else branch:
`fmt.Printf("unix.Access returned error: %v\n", err)`.
I don't know the codebase of goredo, so I will accept if calling
`redo /some/dir/file` from within an arbitrary path on my fs
(which happens to contain a symlink) can fail.
But I don't think that calling `/bin/sh` on that executable file is acceptable.
It can lead to very confusing errors, and could possibly have disastrous
side-effects if the intended interpreter has commands which are
also valid in `sh` with different semantics.
next prev parent reply other threads:[~2025-10-24 13:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 13:54 goredo gets confused with relative paths and symlinks Rafael Fourquet
2025-10-23 14:10 ` goredo
2025-10-23 14:58 ` Rafael Fourquet
2025-10-24 12:12 ` Sergey Matveev
2025-10-24 13:45 ` Rafael Fourquet [this message]
2025-10-24 13:59 ` Sergey Matveev
2025-10-24 12:03 ` Sergey Matveev
2025-10-26 14:34 ` Sergey Matveev