]> Cypherpunks.ru repositories - goredo.git/blobdiff - main.go
Raise copyright years in advance
[goredo.git] / main.go
diff --git a/main.go b/main.go
index 03a73d448334295d8aa4e7a04f5a6b46c59f9a88..486edfedabe3ab895e37a0050daf8e21614f3f52 100644 (file)
--- a/main.go
+++ b/main.go
@@ -1,6 +1,6 @@
 /*
 goredo -- djb's redo implementation on pure Go
-Copyright (C) 2020-2023 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2020-2024 Sergey Matveev <stargrave@stargrave.org>
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -21,9 +21,11 @@ import (
        "bufio"
        "bytes"
        "encoding/hex"
+       "errors"
        "flag"
        "fmt"
        "io"
+       "io/fs"
        "log"
        "os"
        "os/signal"
@@ -392,9 +394,13 @@ func main() {
                var dos []string
                dos, err = whichdo(tgts[0])
                if err != nil {
-                       break
+                       if errors.Is(err, fs.ErrNotExist) {
+                               err = nil
+                               ok = false
+                       } else {
+                               break
+                       }
                }
-               sort.Strings(dos)
                for _, do := range dos {
                        fmt.Println(do)
                }