feat(remote): global tempDir when the path is absolute #1661
+59
−29
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 :)