Updating macros

This commit is contained in:
Alex Yatskov 2015-07-20 20:03:26 +09:00
parent 2eb2dceedf
commit 4fc1dc0e9d

View File

@ -49,7 +49,7 @@ func processCmd(params []string, dir string, conf *config, flags int) error {
m, ok := conf.Macros[macroName] m, ok := conf.Macros[macroName]
if !ok { if !ok {
return fmt.Errorf("macro dependency not found %s", macroName) return fmt.Errorf("macro not found %s", macroName)
} }
cmdArgs = appendExpEnv(cmdArgs, m.Prefix) cmdArgs = appendExpEnv(cmdArgs, m.Prefix)
@ -57,6 +57,10 @@ func processCmd(params []string, dir string, conf *config, flags int) error {
cmdArgs = appendExpEnv(cmdArgs, args[1:]) cmdArgs = appendExpEnv(cmdArgs, args[1:])
} }
cmdArgs = appendExpEnv(cmdArgs, m.Suffix) cmdArgs = appendExpEnv(cmdArgs, m.Suffix)
if flags&flagVerbose == flagVerbose {
log.Printf("using macro %s", macroName)
}
} else if len(args) > 1 { } else if len(args) > 1 {
cmdArgs = args[1:] cmdArgs = args[1:]
} }