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

Execute a task in the directory where it's defined #3062

Open
Nickersoft opened this issue Nov 17, 2024 · 0 comments
Open

Execute a task in the directory where it's defined #3062

Nickersoft opened this issue Nov 17, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@Nickersoft
Copy link
Contributor

I'm currently migrating all my Justfiles to use Mise tasks now that tasks seem to be relatively stable – however, I'm running into one big difference in how tasks behave compared to Just. Whereas just tasks execute from the same directory as the justfile they're defined in, Mise executes all tasks from the root of the project where the mise.toml file is (as per the docs).

My project is a monorepo, and in each package I'm defining a tasks.toml file with grouped tasks for that package, then importing them all in the top-level mise.toml file. Unfortunately, to make this work I also need to specify the full relative path of the package via the dir option for every task in tasks.toml so I use relative file paths and executables in my task run field.

It'd be great if there could be a template variable similar to the existing {cwd}, but instead of using the working directory the user is currently calling the task from, it executes using the directory of the tasks.toml file.

Hope this all makes sense!

Example of what I'm talking about

@Nickersoft Nickersoft added the enhancement New feature or request label Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant