mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-14 02:06:16 +02:00
Merge pull request #6120 from mayflower/print-full-names
path-info: use full store paths when we have them
This commit is contained in:
commit
f22b9e72f5
2 changed files with 3 additions and 2 deletions
|
@ -761,11 +761,11 @@ void Store::pathInfoToJSON(JSONPlaceholder & jsonOut, const StorePathSet & store
|
||||||
|
|
||||||
for (auto & storePath : storePaths) {
|
for (auto & storePath : storePaths) {
|
||||||
auto jsonPath = jsonList.object();
|
auto jsonPath = jsonList.object();
|
||||||
jsonPath.attr("path", printStorePath(storePath));
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
auto info = queryPathInfo(storePath);
|
auto info = queryPathInfo(storePath);
|
||||||
|
|
||||||
|
jsonPath.attr("path", printStorePath(info->path));
|
||||||
jsonPath
|
jsonPath
|
||||||
.attr("narHash", info->narHash.to_string(hashBase, true))
|
.attr("narHash", info->narHash.to_string(hashBase, true))
|
||||||
.attr("narSize", info->narSize);
|
.attr("narSize", info->narSize);
|
||||||
|
@ -819,6 +819,7 @@ void Store::pathInfoToJSON(JSONPlaceholder & jsonOut, const StorePathSet & store
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (InvalidPath &) {
|
} catch (InvalidPath &) {
|
||||||
|
jsonPath.attr("path", printStorePath(storePath));
|
||||||
jsonPath.attr("valid", false);
|
jsonPath.attr("valid", false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,7 +97,7 @@ struct CmdPathInfo : StorePathsCommand, MixJSON
|
||||||
|
|
||||||
for (auto & storePath : storePaths) {
|
for (auto & storePath : storePaths) {
|
||||||
auto info = store->queryPathInfo(storePath);
|
auto info = store->queryPathInfo(storePath);
|
||||||
auto storePathS = store->printStorePath(storePath);
|
auto storePathS = store->printStorePath(info->path);
|
||||||
|
|
||||||
std::cout << storePathS;
|
std::cout << storePathS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue