diff --git a/nix/libstore/gc.cc b/nix/libstore/gc.cc index 77a2a7027db..610270f907e 100644 --- a/nix/libstore/gc.cc +++ b/nix/libstore/gc.cc @@ -318,7 +318,8 @@ static void findRoots(StoreAPI & store, const Path & path, unsigned char type, R catch (SysError & e) { /* We only ignore permanent failures. */ if (e.errNo == EACCES || e.errNo == ENOENT || e.errNo == ENOTDIR) - printMsg(lvlInfo, format("cannot read potential root `%1%'") % path); + printMsg(lvlInfo, format("cannot read potential root '%1%': %2%") + % path % strerror(e.errNo)); else throw; }