Skip to content

Conversation

@NikitaCOEUR
Copy link

Fixes #1966

This pull request includes changes to enhance the handling of deferred commands and variables in tasks, as well as updates to the corresponding tests and task configuration files. The most important changes include adding support for variable substitution in deferred commands.

Enhancements to deferred commands:

  • task.go: Added logic to handle variable substitution for the Value and Sh fields in deferred tasks. This ensures that variables are correctly replaced with their values before the command is executed.

Updates to tests:

  • task_test.go: Added new test cases to verify that deferred commands with variable substitution are executed correctly, including handling of EXIT_CODE and other dynamic values.

Updates to task configuration:

  • testdata/deferred/Taskfile.yml: Updated the task configuration to include examples of deferred commands with variable substitution, demonstrating the new functionality and ensuring comprehensive test coverage.

@NikitaCOEUR
Copy link
Author

@pd93 Would you have time to take a look at this PR?

@NikitaCOEUR
Copy link
Author

Resolved in #2173

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

Successfully merging this pull request may close these issues.

Issue with EXIT_CODE variable not available in deferred tasks referencing another task

1 participant