Skip to content

.task-experiments.yml not getting seen #2156

@joeblew999

Description

@joeblew999

Description

I cant seem to get TASK to see the .task-experiments.yml file.

It does see them in the .env file.

My use case if that I want to use .task-experiments.yml, so that it works in the GitHub actions also, and so then the .env for the developer does not need to be checking into the repo. Normal good practice things to do.

go version
go version go1.24.2 darwin/arm64

go install github.com/go-task/task/v3/cmd/task@latest

task --version
Task version: v3.42.1 (h1:HOaFbZGLOrAy2V/dLsX2rGJZVG2Qx6268KUIAIXdNE4=)

task
task: Remote taskfiles are not enabled. You can read more about this experiment and how to enable it at https://taskfile.dev/experiments/remote-taskfiles

 task --experiments
* GENTLE_FORCE:     off
* REMOTE_TASKFILES: off
* MAP_VARIABLES:    off
* ENV_PRECEDENCE:   off

reproduction

.env file

# Each repo needs a base environment.

### task settings

# https://taskfile.dev/experiments/env-precedence
#TASK_X_ENV_PRECEDENCE=1
# https://taskfile.dev/experiments/gentle-force/
#TASK_X_GENTLE_FORCE=1
# https://taskfile.dev/experiments/map-variables/?proposal=2
#TASK_X_MAP_VARIABLES=2
# https://taskfile.dev/experiments/remote-taskfiles/
#TASK_X_REMOTE_TASKFILES=1


### git settings

GIT_SIGNING_USER_NAME=joeblew999
[email protected]

# need to test on windows machine.
GIT_SIGNING_KEY_PRIV={{.HOME}}/.ssh/joeblew999_github.com
GIT_SIGNING_KEY={{.HOME}}/.ssh/joeblew999_github.com.pub

.task-experiments.yml file

# If .env and .task-experiments.yml are present the values in the .task-experiments.yml file take precedence.

experiments:
  TASK_X_ENV_PRECEDENCE: 1
  TASK_X_GENTLE_FORCE: 1 
  TASK_X_MAP_VARIABLES: 2
  TASK_X_REMOTE_TASKFILES: 1

taskfile.yml file

# https://taskfile.dev

version: '3'

dotenv: ['.env', '{{.ENV}}/.env', '{{.HOME}}/.env']

includes:
  # base stuff
  base: ./base.taskfile.yml
  git: ./git.taskfile.yml
  go: ./go.taskfile.yml

  
  # modules
  caddy: ./mod/caddy/taskfile.yml
  cloudflare: ./mod/cloudflare/taskfile.yml
  compose: ./mod/compose/taskfile.yml
  datastar: ./mod/datastar/taskfile.yml
  #reck: ./mod/reck/taskfile.yml
  remote:
    # binary needed: https://github.com/aquasecurity/trivy/releases/tag/v0.60.0
    # https://github.com/saydulaev/taskfile
    taskfile: https://raw.githubusercontent.com/saydulaev/taskfile/v1.4.3/Taskfile.yml
    

  ### projects
  todo: ./proj/todo/taskfile.yml

Version

v3.42.1

Operating system

darwin arm64

Experiments Enabled

Remote Taskfiles, Env Precedence, Map Variables (2), Gentle Force

Example Taskfile

# https://taskfile.dev

version: '3'

dotenv: ['.env', '{{.ENV}}/.env', '{{.HOME}}/.env']

includes:
  # base stuff
  base: ./base.taskfile.yml
  git: ./git.taskfile.yml
  go: ./go.taskfile.yml

  
  # modules
  caddy: ./mod/caddy/taskfile.yml
  cloudflare: ./mod/cloudflare/taskfile.yml
  compose: ./mod/compose/taskfile.yml
  datastar: ./mod/datastar/taskfile.yml
  #reck: ./mod/reck/taskfile.yml
  remote:
    # binary needed: https://github.com/aquasecurity/trivy/releases/tag/v0.60.0
    # https://github.com/saydulaev/taskfile
    taskfile: https://raw.githubusercontent.com/saydulaev/taskfile/v1.4.3/Taskfile.yml
    

  ### projects
  todo: ./proj/todo/taskfile.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions