mirror of
				https://github.com/go-task/task.git
				synced 2025-10-30 23:58:01 +02:00 
			
		
		
		
	fix(interp): move from deprecated ExecHandler to the new ExecHandlers
				
					
				
			This commit is contained in:
		| @@ -59,7 +59,7 @@ func RunCommand(ctx context.Context, opts *RunCommandOptions) error { | ||||
| 	r, err := interp.New( | ||||
| 		interp.Params(params...), | ||||
| 		interp.Env(expand.ListEnviron(environ...)), | ||||
| 		interp.ExecHandler(interp.DefaultExecHandler(15*time.Second)), | ||||
| 		interp.ExecHandlers(execHandler), | ||||
| 		interp.OpenHandler(openHandler), | ||||
| 		interp.StdIO(opts.Stdin, opts.Stdout, opts.Stderr), | ||||
| 		dirOption(opts.Dir), | ||||
| @@ -113,6 +113,10 @@ func Expand(s string) (string, error) { | ||||
| 	return "", nil | ||||
| } | ||||
|  | ||||
| func execHandler(next interp.ExecHandlerFunc) interp.ExecHandlerFunc { | ||||
| 	return interp.DefaultExecHandler(15 * time.Second) | ||||
| } | ||||
|  | ||||
| func openHandler(ctx context.Context, path string, flag int, perm os.FileMode) (io.ReadWriteCloser, error) { | ||||
| 	if path == "/dev/null" { | ||||
| 		return devNull{}, nil | ||||
|   | ||||
		Reference in New Issue
	
	Block a user