Subject: bug#45279: [core-updates] copy-recursively does not throw an error on missing directory

From: zimoun <[email-masked]>
Date: Fri, 18 Dec 2020 04:33:45 +0100

Hi,

On Thu, 17 Dec 2020 at 12:03, Ludovic Courtès <[email-masked]> wrote:
> Marius Bakke <[email-masked]> skribis:
>
>> On the 'core-updates' branch, using copy-recursively on a nonexistent
>> directory does not cause a build failure.  Instead an error is printed
>> and the script continues:
>>
>>   (copy-recursively "doesnotexist" output)
>>   [...]
>>   starting phase `install'
>>   i/o error: doesnotexist: No such file or directory
>>   phase `install' succeeded after 0.0 seconds
>>
>> This is on cc6cb6e80a42355147809b4830053a34d1563994.
>
> I think it’s always been this way.  Do you think we should change it?

An example from bug#45308 [1] using ’copy-file’, it raises an error and
so a failure.  If ’copy-recursively’ is used instead, it means that the
build would say «success» and print “i/o error:” somewhere in the long
build log, right?  Harder to notice.

As The Zen of Python (python -c 'import this') says: :-)

        Errors should never pass silently.
        Unless explicitly silenced.

All the best,
simon

1: <http://issues.guix.gnu.org/issue/45308>