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

feat: read Taskfiles from stdin #1483

Merged
merged 5 commits into from Feb 22, 2024
Merged

feat: read Taskfiles from stdin #1483

merged 5 commits into from Feb 22, 2024

Conversation

pd93
Copy link
Member

@pd93 pd93 commented Jan 25, 2024

Closes #655

Adds a new StdinNode that implements the Node interface. This is a special-case Node that only gets created if Task detects bytes in stdin when starting. I've refactored the way we create "root" nodes (i.e. nodes without parents) in order to do this. I think the result is a bit nicer and lays the groundwork for root remote nodes too.

I also had to resolve an issue in the reader where an included file's BaseDir was only being set for FileNode. I have added a BaseDir() method to the Node interface and this will now be added by any node that returns a non-empty string when calling this method.

Lastly, I have updated the docs with a section on reading from stdin. This also includes a commit that adds some missing syntax highlighters to our docs site and standardises the ```shell code blocks language ID.

Copy link
Member

@andreynering andreynering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely implemented! 👏 👏 👏

@pd93
Copy link
Member Author

pd93 commented Feb 22, 2024

@andreynering Small change in 7abbc15 as per this conversation: #655 (comment). Please let me know if you're ok with this?

@brianbraunstein Could you please give the changes a go and see if they work as you expect

@andreynering
Copy link
Member

@pd93 Looks fine to me 👍

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.

Read Taskfile from stdin
2 participants