You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// RunCompiled runs an already-compiled mage command with the given args,
705
711
funcRunCompiled(invInvocation, exePathstring, errlog*log.Logger) int {
706
712
debug.Println("running binary", exePath)
707
-
c:=exec.Command(exePath, inv.Args...)
713
+
c:=internal.WrapRun(exePath, inv.Args...)
708
714
c.Stderr=inv.Stderr
709
715
c.Stdout=inv.Stdout
710
716
c.Stdin=inv.Stdin
711
717
c.Dir=inv.Dir
712
718
ifinv.WorkDir!=inv.Dir {
713
719
c.Dir=inv.WorkDir
714
720
}
721
+
715
722
// intentionally pass through unaltered os.Environ here.. your magefile has
716
723
// to deal with it.
717
724
c.Env=os.Environ()
725
+
726
+
// We don't want to actually allow dryrun in the outermost invocation of mage, since that will inhibit the very compilation of the magefile & the use of the resulting binary.
727
+
// But every situation that's within such an execution is one in which dryrun is supported, so we set this environment variable which will be carried over throughout all such situations.
// In dryrun mode, the actual "command" will just print the cmd and args to stdout; so we want to make sure we're outputting that regardless of verbosity settings.
0 commit comments