-
-
Notifications
You must be signed in to change notification settings - Fork 615
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(remote): global tempDir when the path is absolute #1661
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vmaerten Good catch, this makes sense! The implementation looks good to me as well.
I think a TASK_REMODE_DIR
would be a good addition to this change. If given, use that, otherwise fallback to TASK_TEMP_DIR
as you already did.
@andreynering thanks! I've added the new env variable. Let me know if you think that adding it in environment reference is needed. It would be amazing if we could get this merged before the next version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if you think that adding it in environment reference is needed.
@vmaerten Yes, please add to this section: https://taskfile.dev/api/#env
Co-authored-by: Andrey Nering <andrey@nering.com.br>
This PR allow to have a global temp directory when using remote taskfile.
Considering a setup with multiple different projects, all using the same remote taskfile. if / when the remote taskfile changes, we need to approve the prompt for all projects.
At the beginning, I thought changing the TASK_X_TEMP_DIR to
~/.task
, but I've seen that it's suffixed with the dir so I won't work.The fingerprint dir should stay scoped
This PR changes the behavior only for remote. If the path is absolute or start with
~
then we do not suffix it.For the implementation, I've chosen to create a struct and store the two paths in it. We could also in the future add an env variable like
TASK_X_REMOTE_DIR
. If you think it can be a nice addition, I can implement it in this PRAny feedback on this feature are appreciated :)