diff --git a/cmd/task/task.go b/cmd/task/task.go index 24a530a7..6cdcdb0d 100644 --- a/cmd/task/task.go +++ b/cmd/task/task.go @@ -120,7 +120,6 @@ func run() error { flags.Entrypoint, flags.Dir, flags.Insecure, - flags.Timeout, ) if err != nil { return err diff --git a/executor.go b/executor.go index ce855c37..a439b96c 100644 --- a/executor.go +++ b/executor.go @@ -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. diff --git a/executor_setup.go b/executor_setup.go index 1b8e3465..91282299 100644 --- a/executor_setup.go +++ b/executor_setup.go @@ -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, diff --git a/internal/flags/flags.go b/internal/flags/flags.go index 38279e71..c3611558 100644 --- a/internal/flags/flags.go +++ b/internal/flags/flags.go @@ -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), diff --git a/taskfile/node.go b/taskfile/node.go index 3dc3344c..7824d6fe 100644 --- a/taskfile/node.go +++ b/taskfile/node.go @@ -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