-
-
Notifications
You must be signed in to change notification settings - Fork 729
Closed
Description
Description
When running Task with a file path containing spaces, empty directories with backslash-escaped spaces are being created unexpectedly.
Details
I have a Taskfile at the path: ~/Desktop/untitled folder test/demo-project/Taskfile.yml
This Taskfile includes another taskfile in the same directory: ~/Desktop/untitled folder test/demo-project/TasksPython.yml
When I run task python:demo
from ~/Desktop/untitled folder test/demo-project
, Task makes empty directories:
~/Desktop/untitled\ folder\ test
~/Desktop/untitled\ folder\ test/demo-project
The task command itself executes successfully:
❯ task python:demo
task: [python:demo] echo "test"
test
The files are:
# Taskfile.yml
version: "3"
includes:
python:
taskfile: "TasksPython.yml"
flatten: false
# TasksPython.yml
version: "3"
tasks:
demo:
- echo "test"
Additional information
- This issue only occurs when using the includes directive in the main Taskfile
- The empty directories are created regardless of whether the flatten option is set to true or false (i.e. the behavior is the same running
task demo
withflatten: true
) - The issue appears to be related to how Task handles paths with spaces
Task: 3.43.3
MacOS: 14.7.5
Shell: zsh 5.9 (x86_64-apple-darwin23.0)
❯ task --experiments
* GENTLE_FORCE: off
* REMOTE_TASKFILES: off
* ENV_PRECEDENCE: off
Version
3.43.3
Operating system
MacOS 14.7.5
Experiments Enabled
No response
Example Taskfile
version: "3"
includes:
python:
taskfile: "TasksPython.yml"
Metadata
Metadata
Assignees
Labels
No labels