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

Explorations into task dir issues #1873

Draft
wants to merge 2,029 commits into
base: main
Choose a base branch
from
Draft

Conversation

jatinn
Copy link

@jatinn jatinn commented Apr 8, 2024

Been using mise for tool management and had started trying to use tasks but ran into some issues when trying to run from nested dirs.

Have a minimal test setup with 3 cases and was able to figure out some changes for 2 of the cases.

dir setup and all mise tasks run commands should be executed from within the runner dir

project
├── .mise.toml
├── scripts
│  └── hello.sh
└── runner

.mise.toml contents

[settings]
experimental = true

[tasks.case1]
# should print the project root dir not cwd
run = "pwd"

[tasks.case2]
run = "ls"
dir = "{{config_root}}/scripts"

[tasks.case3]
file = "scripts/hello.sh"

Leaving this as a draft pr as not very familiar with rust or the codebase so there are likely better ways of fixing these.
Hope this helps make it easier for folks to investigate further.

case1 successfully executes without any changes however it seems to use the current directory instead of the project root as mentioned in the documentation.

root cause for case2 seems to be that dir is not rendered using tera when loading tasks from the toml config (it works for script tasks) so the path substitutions do not happen within the dir path.

Believe for case3 it is something similar where the project root is not being added as a prefix to the file path for the script, however wasn't able to find or confirm if that is the case. Had tried a variation of case3 with specifying the dir = "{{config_root}}" to check if the case2 fix would have helped with no luck.

jdx and others added 30 commits February 2, 2024 15:47
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* use serde to parse tools

* Commit from GitHub Actions (test)

* use serde to parse tools

---------

Co-authored-by: mise[bot] <123107610+mise-en-dev@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#1611)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* calm io

Fixes `| head` so it does not panic

* Commit from GitHub Actions (test)

---------

Co-authored-by: mise[bot] <123107610+mise-en-dev@users.noreply.github.com>
on my current hotel internet http does not work
jdx and others added 24 commits March 30, 2024 13:11
* feat(task): extend mise tasks output

* fix: update snapshot

* fix: use -x,--extended instead of --full
* chore: release 2024.3.11

* Commit from GitHub Actions (test)
Bumps [h2](https://github.com/hyperium/h2) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases)
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md)
- [Commits](hyperium/h2@v0.3.25...v0.3.26)

---
updated-dependencies:
- dependency-name: h2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@jdx jdx force-pushed the main branch 2 times, most recently from fad123b to d13511e Compare April 23, 2024 19:21
@jatinn
Copy link
Author

jatinn commented May 4, 2024

@jdx are any of these approaches to the fix worth cleaning up?

@jdx
Copy link
Owner

jdx commented May 6, 2024

Sorry just haven't found a time to review yet, I'll give it a pass soon

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.

None yet