]> Cypherpunks.ru repositories - goredo.git/commitdiff
Autosubstitute all target only for plain redo
authorSergey Matveev <stargrave@stargrave.org>
Tue, 15 Dec 2020 12:18:44 +0000 (15:18 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 15 Dec 2020 12:31:55 +0000 (15:31 +0300)
Because it is possible that redo-ifchange is run without any targets.

main.go

diff --git a/main.go b/main.go
index b5618e649916efac50dc6ca0d6668a330422f80a..e066f443f55f190b279abbe4991006c4a444389b 100644 (file)
--- a/main.go
+++ b/main.go
@@ -170,6 +170,7 @@ func main() {
                fdDep = mustParseFd(v, EnvDepFd)
        }
        BuildUUID = os.Getenv(EnvBuildUUID)
+       tgts := flag.Args()
        if BuildUUID == "" {
                raw := new([16]byte)
                if _, err = io.ReadFull(rand.Reader, raw[:]); err != nil {
@@ -180,6 +181,9 @@ func main() {
                        "%x-%x-%x-%x-%x",
                        raw[0:4], raw[4:6], raw[6:8], raw[8:10], raw[10:],
                )
+               if len(tgts) == 0 {
+                       tgts = []string{"all"}
+               }
        }
        statusInit()