mirror of
				https://github.com/go-task/task.git
				synced 2025-10-30 23:58:01 +02:00 
			
		
		
		
	Running deps first
This commit is contained in:
		
							
								
								
									
										10
									
								
								task.go
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								task.go
									
									
									
									
									
								
							| @@ -2,6 +2,7 @@ package task | ||||
|  | ||||
| import ( | ||||
| 	"encoding/json" | ||||
| 	"fmt" | ||||
| 	"io/ioutil" | ||||
| 	"log" | ||||
| 	"os" | ||||
| @@ -83,10 +84,6 @@ func RunTask(name string) error { | ||||
| 		return &taskNotFoundError{name} | ||||
| 	} | ||||
|  | ||||
| 	if !Force && isTaskUpToDate(t) { | ||||
| 		log.Printf(`task: Task "%s" is up to date`, name) | ||||
| 		return nil | ||||
| 	} | ||||
| 	vars, err := t.handleVariables() | ||||
| 	if err != nil { | ||||
| 		return &taskRunError{name, err} | ||||
| @@ -98,6 +95,11 @@ func RunTask(name string) error { | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	if !Force && isTaskUpToDate(t) { | ||||
| 		log.Printf(`task: Task "%s" is up to date`, name) | ||||
| 		return nil | ||||
| 	} | ||||
|  | ||||
| 	for _, c := range t.Cmds { | ||||
| 		// read in a each time, as a command could change a variable or it has been changed by a dependency | ||||
| 		vars, err = t.handleVariables() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user