[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#63647] [PATCH 0/2] Fix annoyance with "guix import go"
From: |
Ludovic Courtès |
Subject: |
[bug#63647] [PATCH 0/2] Fix annoyance with "guix import go" |
Date: |
Mon, 05 Jun 2023 14:45:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Simon Tournier <zimon.toutoune@gmail.com> skribis:
> * guix/import/go.scm (git-checkout-hash): Catch Git error.
[...]
> + (catch 'git-error
> + (lambda _
> + (let-values (((checkout commit _)
> + (parameterize ((%repository-cache-directory cache))
> + (update-cached-checkout url
> + #:ref
> + `(tag-or-commit .
> ,reference)))))
> + (file-hash* checkout #:algorithm algorithm #:recursive? #true)))
> + (lambda (key error . rest)
> + (warning (G_ "Git error: ~a in ~a~%") (git-error-message error) url)
> + (nix-base32-string->bytevector
> + "0000000000000000000000000000000000000000000000000000"))))
I’d rather let the exception through. How about adding
‘with-git-error-handling’ at the UI level, in (guix scripts import go)?
Thanks,
Ludo’.