]> Cypherpunks.ru repositories - goredo.git/commitdiff
Fix targets with absolute paths workability
authorSergey Matveev <stargrave@stargrave.org>
Tue, 15 Dec 2020 12:19:15 +0000 (15:19 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 15 Dec 2020 12:31:55 +0000 (15:31 +0300)
main.go

diff --git a/main.go b/main.go
index e066f443f55f190b279abbe4991006c4a444389b..ed87a54efa8b84e3706e1436b5f5e59e2c613d62 100644 (file)
--- a/main.go
+++ b/main.go
@@ -187,10 +187,12 @@ func main() {
        }
        statusInit()
 
-       tgts := flag.Args()
-       if len(tgts) == 0 {
-               tgts = []string{"all"}
+       for i, tgt := range tgts {
+               if path.IsAbs(tgt) {
+                       tgts[i] = cwdMustRel(tgt)
+               }
        }
+
        ok := true
        err = nil
        cmdName := path.Base(os.Args[0])