mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
cache: Gracefully handle non-existent cache.
* guix/cache.scm (maybe-remove-expired-cache-entries): Ignore ENOENT when writing EXPIRY-FILE.
This commit is contained in:
parent
3c96158438
commit
2cb0b3709a
1 changed files with 8 additions and 2 deletions
|
@ -101,7 +101,13 @@ (define last-expiry-date
|
|||
#:now now
|
||||
#:entry-expiration entry-expiration
|
||||
#:delete-entry delete-entry)
|
||||
(call-with-output-file expiry-file
|
||||
(cute write (time-second now) <>))))
|
||||
(catch 'system-error
|
||||
(lambda ()
|
||||
(call-with-output-file expiry-file
|
||||
(cute write (time-second now) <>)))
|
||||
(lambda args
|
||||
;; ENOENT means CACHE does not exist.
|
||||
(unless (= ENOENT (system-error-errno args))
|
||||
(apply throw args))))))
|
||||
|
||||
;;; cache.scm ends here
|
||||
|
|
Loading…
Reference in a new issue