Skip to content
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

ROOT_DIR variable is not an absolute path. #1354

Closed
wburningham opened this issue Sep 27, 2023 · 1 comment
Closed

ROOT_DIR variable is not an absolute path. #1354

wburningham opened this issue Sep 27, 2023 · 1 comment

Comments

@wburningham
Copy link

  • Task version: Task version: v3.30.1 (h1:HdfCTAJDHoWL3+3RyY+o+0IK1O5xQaSBrZIq2SKOQ84=)
  • Operating system: macOS: Apple M1 Max
  • Experiments enabled: should be N/A (but I do have TASK_X_REMOTE_TASKFILES=1)

Problem

The documentation on Special Variables says:

ROOT_DIR | The absolute path of the root Taskfile.

But the value of ROOT_DIR is a relative path not an absolute path.

Setup

/tmp ❯ tree
.
├── bar
│   └── taskfile.yaml
├── foo
/tmp ❯ cat bar/taskfile.yaml
version: '3'
tasks:
  default:
    cmds:
        - echo {{ .ROOT_DIR }}
/tmp ❯ cd foo/
/tmp/foo ❯ task -t ../bar/taskfile.yaml
task: [default] echo ../bar
../bar

Expected /tmp/bar. Actual ../bar

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Sep 27, 2023
metafeather added a commit to metafeather/tools that referenced this issue Jan 30, 2024
@vmaerten
Copy link
Member

This is working since v3.35.1

@task-bot task-bot removed the state: needs triage Waiting to be triaged by a maintainer. label May 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants