Open
Description
If I explicitly specify a target on the command line which is also a dependency of another target I specify on the command line, it should only run that target once.
Instead it seems it runs a target once per target on the command line
Example magefile.go
:
// +build mage
package main
import (
"fmt"
"github.com/magefile/mage/mg"
)
func A() {
fmt.Println("A")
}
func B() {
fmt.Println("B(deps)")
mg.Deps(A)
fmt.Println("B")
}
Invocation:
mage a b
Expected:
A
B(deps)
B
Actual:
A
B(deps)
A
B
More fun:
$ mage a b b
A
B(deps)
A
B
B(deps)
B
I'd expect this to be equivalent to just running mage a b
, which should be functionally equivalent to running mage b