Commit Graph

7 Commits

Author SHA1 Message Date
Valentin Maerten
d67cba4b29 fix: restore forward slashes for special path variables
The test proved that normalizing only in tests is not sufficient.
The production code must use forward slashes to:
1. Prevent escape sequence issues (\a, \t interpreted as bell, tab)
2. Ensure consistent behavior across platforms
3. Allow portable Taskfiles that work on all OSes
2026-01-31 18:54:03 +01:00
Valentin Maerten
aa99c052b5 test: revert compiler.go to test if normalization alone works 2026-01-31 18:54:03 +01:00
Valentin Maerten
22de1f5a10 fix: use forward slashes for special path variables on all platforms
Use filepath.ToSlash() for ROOT_DIR, ROOT_TASKFILE, USER_WORKING_DIR,
TASK_DIR, TASKFILE, and TASKFILE_DIR to ensure consistent forward
slashes across platforms.

This fixes an issue on Windows where backslashes in paths were being
interpreted as escape sequences when used in shell commands like
`echo {{.ROOT_DIR}}`.
2026-01-31 18:54:03 +01:00
Valentin Maerten
4ab1958df1 feat(summary): add vars, env, and requires display (#2524) 2025-11-29 11:14:20 +01:00
Pete Davison
03b242d4c3 fix: bug where undefined/null variables resolve to "" instead of nil (#2144) 2025-03-30 19:21:02 +00:00
Pete Davison
6604b9a8cc fix: special variable type errors in vars with no task context (#2107)
* fix: stop dotenv trying to fetch variables when no dotenv specified

* fix: set special variables to "" when they can't be calculated
2025-03-10 11:46:07 +00:00
Pete Davison
60c8ee0ce6 refactor: ast.Call should be in main task package (#2084) 2025-02-23 18:30:42 +00:00