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

fix(deferred): add EXIT_CODE to deferred tasks #1967

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

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