aboutsummaryrefslogtreecommitdiff
path: root/cmd/krino/sort.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/krino/sort.go')
-rw-r--r--cmd/krino/sort.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/krino/sort.go b/cmd/krino/sort.go
index 4c0a0d8..54d5574 100644
--- a/cmd/krino/sort.go
+++ b/cmd/krino/sort.go
@@ -104,6 +104,13 @@ func cmdSort(g *globals, names []string, stdout, stderr io.Writer) int {
fmt.Fprintf(stderr, "krino: %v\n", err)
return 1
}
+ // Sorting opens the log before the first directory, as it always has:
+ // the run id is fixed for every directory, and a failure to open is
+ // reported before anything is planned.
+ if err := sess.OpenLog(); err != nil {
+ fmt.Fprintf(stderr, "krino: %v\n", err)
+ return 1
+ }
defer func() {
if cerr := sess.Close(); cerr != nil {
fmt.Fprintf(stderr, "krino: %v\n", cerr)