mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
nix-store --export: Export paths in topologically sorted order
Fixes #118.
This commit is contained in:
parent
107505e13a
commit
b09b87321c
2 changed files with 4 additions and 2 deletions
|
@ -694,7 +694,9 @@ static void opExport(Strings opFlags, Strings opArgs)
|
|||
else throw UsageError(format("unknown flag `%1%'") % *i);
|
||||
|
||||
FdSink sink(STDOUT_FILENO);
|
||||
exportPaths(*store, opArgs, sign, sink);
|
||||
Paths sorted = topoSortPaths(*store, PathSet(opArgs.begin(), opArgs.end()));
|
||||
reverse(sorted.begin(), sorted.end());
|
||||
exportPaths(*store, sorted, sign, sink);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue