Skip to content

Define behavior for special variables in remote Taskfiles #2267

@pd93

Description

@pd93

Description

Using the example remote taskfile, we can see the differences between the values:

Running Local Taskfile:

❯ task -d ./website/static/Taskfile.yml special-variables
CLI_ARGS:         
CLI_ARGS_LIST:    
CLI_ARGS_FORCE:   
CLI_ARGS_SILENT:  
CLI_ARGS_VERBOSE: 
CLI_ARGS_OFFLINE: 
TASK:             special-variables
ALIAS:            special-variables
TASK_EXE:         task
ROOT_TASKFILE:    /home/pete/dev/github.com/go-task/task/website/static   <--- unrelated - but I think this is incorrect
ROOT_DIR:         /home/pete/dev/github.com/go-task/task/website/static
TASKFILE:         /home/pete/dev/github.com/go-task/task/website/static/Taskfile.yml
TASKFILE_DIR:     /home/pete/dev/github.com/go-task/task/website/static
TASK_DIR:         /home/pete/dev/github.com/go-task/task/website/static
USER_WORKING_DIR: /home/pete/dev/github.com/go-task/task
TASK_VERSION:     3.43.3

Running Remote Taskfile:

❯ TASK_X_REMOTE_TASKFILES=1 task -t https://taskfile.dev special-variables
CLI_ARGS:         
CLI_ARGS_LIST:    
CLI_ARGS_FORCE:   
CLI_ARGS_SILENT:  
CLI_ARGS_VERBOSE: 
CLI_ARGS_OFFLINE: 
TASK:             special-variables
ALIAS:            special-variables
TASK_EXE:         task
ROOT_TASKFILE:    https:/taskfile.dev
ROOT_DIR:         
TASKFILE:         https://taskfile.dev
TASKFILE_DIR:     https:
TASK_DIR:         
USER_WORKING_DIR: /home/pete/dev/github.com/go-task/task
TASK_VERSION:     3.43.3

The variables that need their behavior defining are:

  • ROOT_TASKFILE
  • ROOT_DIR
  • TASKFILE
  • TASKFILE_DIR
  • TASK_DIR

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: remoteChanges related to remote taskfiles.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions