feat: remove entrypoint from the executor

This commit is contained in:
Pete Davison
2025-07-23 23:24:10 +00:00
parent 1402e2baaf
commit 6e80b401e6
5 changed files with 1 additions and 21 deletions

View File

@@ -120,7 +120,6 @@ func run() error {
flags.Entrypoint,
flags.Dir,
flags.Insecure,
flags.Timeout,
)
if err != nil {
return err

View File

@@ -27,7 +27,6 @@ type (
Executor struct {
// Flags
Dir string
Entrypoint string
TempDir *TempDir
Force bool
ForceAll bool
@@ -123,21 +122,6 @@ func (o *dirOption) ApplyToExecutor(e *Executor) {
e.Dir = o.dir
}
// WithEntrypoint sets the entrypoint (main Taskfile) of the [Executor]. By
// default, Task will search for one of the default Taskfiles in the given
// directory.
func WithEntrypoint(entrypoint string) ExecutorOption {
return &entrypointOption{entrypoint}
}
type entrypointOption struct {
entrypoint string
}
func (o *entrypointOption) ApplyToExecutor(e *Executor) {
e.Entrypoint = o.entrypoint
}
// WithTempDir sets the temporary directory that will be used by [Executor] for
// storing temporary files like checksums and cached remote files. By default,
// the temporary directory is set to the user's temporary directory.

View File

@@ -105,7 +105,7 @@ func (e *Executor) setupCompiler() error {
e.Compiler = &Compiler{
Dir: e.Dir,
Entrypoint: e.Entrypoint,
Entrypoint: e.Taskfile.Location,
UserWorkingDir: e.UserWorkingDir,
TaskfileEnv: e.Taskfile.Env,
TaskfileVars: e.Taskfile.Vars,

View File

@@ -229,7 +229,6 @@ func (o *flagsOption) ApplyToExecutor(e *task.Executor) {
e.Options(
task.WithDir(dir),
task.WithEntrypoint(Entrypoint),
task.WithForce(Force),
task.WithForceAll(ForceAll),
task.WithWatch(Watch),

View File

@@ -3,7 +3,6 @@ package taskfile
import (
"context"
"strings"
"time"
giturls "github.com/chainguard-dev/git-urls"
@@ -33,7 +32,6 @@ func NewRootNode(
entrypoint string,
dir string,
insecure bool,
timeout time.Duration,
) (Node, error) {
dir = fsext.DefaultDir(entrypoint, dir)
// If the entrypoint is "-", we read from stdin