-
-
Notifications
You must be signed in to change notification settings - Fork 686
.taskrc.yml and .env not found when in a sub folder #2159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@pd93 I tested it and it works well. https://github.com/joeblew999/pb-stack/tree/main/proj apple@apples-MacBook-Pro todo-empty % ls -al
total 16
drwxr-xr-x 5 apple staff 160 10 Apr 17:25 .
drwxr-xr-x 8 apple staff 256 4 Apr 18:19 ..
drwxr-xr-x 3 apple staff 96 10 Apr 17:25 .bin
-rw-r--r-- 1 apple staff 63 4 Apr 17:47 main.go
-rw-r--r-- 1 apple staff 406 4 Apr 18:21 README.md
apple@apples-MacBook-Pro todo-empty % task go:bin
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [go:bin] task base:bin
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:bin] echo ''
task: [base:bin] echo 'installing base shell tools ...'
installing base shell tools ...
task: [base:bin] echo ''
task: [base:bin] echo '1. Creating base folders ...'
1. Creating base folders ...
task: [base:bin] mkdir -p /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.bin
task: [base:bin] mkdir -p /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep
task: [base:bin] mkdir -p /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.pack
task: [base:bin] echo ''
task: [base:bin] echo '2. Installing base shell tools ...'
2. Installing base shell tools ...
task: [base:bin] echo ''
task: [base:bin] echo '- which tool ...'
- which tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/hairyhenderson/go-which/cmd/which@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/which /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-which
task: [base:bin] echo ''
task: [base:bin] echo '- tree tool ...'
- tree tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/a8m/tree/cmd/tree@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/tree /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-tree
task: [base:bin] echo '- wgot tool ...'
- wgot tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/bitrise-io/got/cmd/wgot@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/wgot /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-wgot
task: [base:bin] echo '- replace tool ...'
- replace tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/webdevops/go-replace@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/go-replace /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-replace
task: [base:bin] echo '- redress tool ...'
- redress tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/goretk/[email protected]
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/redress /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-redress
task: [base:bin] echo ''
task: [base:bin] echo 'TODO - add the other tools after we sort out the SHELL and BIN Naming to be cross platform ...'
TODO - add the other tools after we sort out the SHELL and BIN Naming to be cross platform ...
task: [go:bin] echo ''
task: [go:bin] echo 'bin'
bin
task: [go:bin] cd /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/proj/todo-empty && go build -o /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/proj/todo-empty/.bin/
task: [go:bin] echo ''
apple@apples-MacBook-Pro todo-empty % task base:experiments
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:experiments] echo ''
task: [base:experiments] echo 'task experiments ...'
task experiments ...
task: [base:experiments] task --yes --experiments
* GENTLE_FORCE: on (1)
* REMOTE_TASKFILES: on (1)
* ENV_PRECEDENCE: on (1)
* ``` |
Not sure why it does not see MAP_VARIABLES https://github.com/joeblew999/pb-stack/blob/main/.taskrc.yml # https://taskfile.dev/experiments/map-variables/?proposal=2
MAP_VARIABLES: 2 |
@joeblew999 In this branch, the
|
Thanks @pd93 I will remove that setting experiment. Shall see leave this issue open , until the respective branch is merged ? |
The issue will autoclose when the PR is merged |
hey @pd93 "MAP_VARIABLES" seems not to be working in https://github.com/go-task/task/tree/recursive-config-search Full reproduction here: https://github.com/joeblew999/pb-stack Toggle the BASE_TASK_VERSION_ENV in: https://github.com/joeblew999/pb-stack/blob/main/all.env, and it will get applied locally and in CI. ``env all.envIs used by all environments.taskBASE_TASK_VERSION_ENV=v3.42.1 https://github.com/go-task/task/tree/recursive-config-search#BASE_TASK_VERSION_ENV=recursive-config-search
Here we go ... with BASE_TASK_VERSION_ENV=recursive-config-search apple@apples-MacBook-Pro pb-stack % task base:test
task: [base:test] echo ''
task: [base:test] echo 'testing base ...'
testing base ...
task: [base:test] task --yes base:upgrade
task: [base:upgrade] echo ''
task: [base:upgrade] echo 'Upgrading base ...'
Upgrading base ...
task: [base:upgrade] echo ''
task: [base:upgrade] echo '1. Installing Task ...'
1. Installing Task ...
task: [base:upgrade] echo 'BASE_TASK_VERSION_ENV:' recursive-config-search
BASE_TASK_VERSION_ENV: recursive-config-search
task: [base:upgrade] go install github.com/go-task/task/v3/cmd/task@recursive-config-search
task: [base:upgrade] echo ''
task: [base:test] task --yes base:bin
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:bin] echo ''
task: [base:bin] echo 'installing base shell tools ...'
installing base shell tools ...
task: [base:bin] echo ''
task: [base:bin] echo '1. Creating base folders ...'
1. Creating base folders ...
task: [base:bin] mkdir -p /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.bin
task: [base:bin] mkdir -p /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep
task: [base:bin] mkdir -p /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.pack
task: [base:bin] echo ''
task: [base:bin] echo '2. Installing base shell tools ...'
2. Installing base shell tools ...
task: [base:bin] echo ''
task: [base:bin] echo '- which tool ...'
- which tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/hairyhenderson/go-which/cmd/which@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/which /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-which
task: [base:bin] echo ''
task: [base:bin] echo '- tree tool ...'
- tree tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/a8m/tree/cmd/tree@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/tree /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-tree
task: [base:bin] echo '- wgot tool ...'
- wgot tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/bitrise-io/got/cmd/wgot@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/wgot /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-wgot
task: [base:bin] echo '- replace tool ...'
- replace tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/webdevops/go-replace@latest
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/go-replace /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-replace
task: [base:bin] echo '- redress tool ...'
- redress tool ...
task: [base:bin] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/goretk/[email protected]
task: [base:bin] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/redress /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-redress
task: [base:bin] echo ''
task: [base:bin] echo 'TODO - add the other tools after we sort out the SHELL and BIN Naming to be cross platform ...'
TODO - add the other tools after we sort out the SHELL and BIN Naming to be cross platform ...
task: [base:test] task --yes base:shell-os-test
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:shell-os-test] echo 'building on darwin'
building on darwin
task: [base:test] task --yes base:shell-which-shell
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:shell-which-shell] task --yes base:shell-which-dep
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:shell-which-dep] echo '- which tool dep ...'
- which tool dep ...
task: [base:shell-which-dep] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/hairyhenderson/go-which/cmd/which@latest
task: [base:shell-which-dep] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/which /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-which
task: [base:shell-which-dep] echo ''
task: [base:shell-which-shell] task --yes base:shell-which -- /bin/zsh
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:shell-which] task --yes base:shell-which-dep
task: Experiment "MAP_VARIABLES" is inactive and cannot be enabled
task: [base:shell-which-dep] echo '- which tool dep ...'
- which tool dep ...
task: [base:shell-which-dep] env GOBIN=/Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep go install github.com/hairyhenderson/go-which/cmd/which@latest
task: [base:shell-which-dep] mv /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/which /Users/apple/workspace/go/src/github.com/joeblew999/pb-stack/.dep/shell-which
task: [base:shell-which-dep] echo ''
task: [base:shell-which] shell-which [/bin/zsh]
task: Failed to run task "base:shell-which": exit status 1
task: Failed to run task "base:shell-which-shell": exit status 201
task: Failed to run task "base:test": exit status 201
|
Uh oh!
There was an error while loading. Please reload this page.
Description
I have a mono repo, and from down in a sub folder the .taskrc.yml and .env is not seen.
Like this pattern: https://taskfile.dev/usage/#running-a-taskfile-from-a-subdirectory
.taskrc.yml MUST be in the sub folder in order to be seen by TASK.
.env must be in the sub folder to be seen by TASK.
I was hoping that I could inherit these things from the root folder, and then just add a .env further down where I want to override things up in the root ...
Reproduction
Here is a set of examples: https://github.com/joeblew999/pb-stack/tree/main/proj
Each showing the commands to run to see the errors with each permutation. This should be an easy way to reproduce the issue.
Version
v3.42.1
Operating system
darwin
Experiments Enabled
Env Precedence, Map Variables (2), Gentle Force, Remote Taskfiles
Example Taskfile
.taskrc.yml file
The text was updated successfully, but these errors were encountered: