Subject: Re: bug#33755: error: execlp: No such file or directory from guix environment

From: Ludovic Courtès <[email-masked]>
Date: Sun, 16 Dec 2018 17:05:31 +0100

Hello comrades!

Timothy Sample <[email-masked]> skribis:

> Danny Milosavljevic <[email-masked]> writes:
>
>> Hi Tim,
>>
>> I like it in princple, but why special-case ENOENT?  I think it would
>> be better to just always print the program name (and maybe program
>> args, too!) and the system error message.
>
> You are right.
[...]

> From aedc745a3f9765ae00dc61a59fa53d22a458551b Mon Sep 17 00:00:00 2001
> From: Timothy Sample <[email-masked]>
> Date: Sat, 15 Dec 2018 23:17:46 -0500
> Subject: [PATCH] environment: Print command name on execlp error.
>
> Fixes <https://bugs.gnu.org/33755>.
>
> * guix/scripts/environment.scm (launch-environment): When execlp fails,
> include the command name in the error message.

Another option would be to do:

  (set! execl
    (error-reporting-wrapper …))

in (guix ui), as done for a few other procedures that have the same
issue.

WDYT?

Ludo’.