Hello! Christopher Baines skribis: > Previously the string-append here would error, which isn't useful as it > doesn't tell you which command couldn't be found. To make the error > actionable, catch it earlier, and explicitly error. > > * guix/build/emacs-build-system.scm (patch-el-files): Handle (which cmd) > returning #f. > --- > guix/build/emacs-build-system.scm | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm > index 2404dbddb..0260f15bb 100644 > --- a/guix/build/emacs-build-system.scm > +++ b/guix/build/emacs-build-system.scm > @@ -93,7 +93,12 @@ store in '.el' files." > (substitute-cmd (lambda () > (substitute* (find-files "." "\\.el$") > (("\"/bin/([^.].*)\"" _ cmd) > - (string-append "\"" (which cmd) "\"")))))) > + (string-append > + "\"" > + (or > + (which cmd) > + (error "patch-el-files: unable to locate " cmd)) > + "\"")))))) For clarity I’d move the ‘error’ call out of the way: