mise
mise copied to clipboard
script tasks are not runnable when not having a project root config file
Describe the bug
I created tasks in the form of .rtx/tasks/:taskname
but when I run rtx tasks
they would not show up as options. rtx run taskname
would also not work.
After some debugging i find that they do show up and work when i have any of the following files at the root:
.rtx.dev.toml .rtx.local.toml .rtx.toml .tool-versions
Also i had a .rtx/config.toml
which did not make it work. But its containing task would show up, just not script tasks.
To Reproduce
- create a new folder
- create a script tasks
.rtx/tasks/:taskname
- run
rtx t
. (it will show an empty list of tasks)
Expected behavior
Should not show an empty list
want to mention. thank you for building this tool. i very much enjoy it.
I just ran into this problem. I'm sure this would be trivial to reproduce in a test but wanted to demonstrate the problem:
rsyring@meld:~/projects/kilo-src$ mise tasks --verbose
[DEBUG] ARGS: /usr/bin/mise tasks --verbose
[DEBUG] Config {
Config Files: [
"~/projects/kilo-src/.mise.toml",
"~/.mise.toml",
"~/.config/mise/config.toml",
],
}
Name Description Source
reqs-compile ~/projects/kilo-src/.mise/tasks/reqs-compile
rsyring@meld:~/projects/kilo-src$ mv .mise.toml .mise/config.toml
rsyring@meld:~/projects/kilo-src$ mise tasks --verbose
[DEBUG] ARGS: /usr/bin/mise tasks --verbose
[DEBUG] Config {
Config Files: [
"~/projects/kilo-src/.mise/config.toml",
"~/.mise.toml",
"~/.config/mise/config.toml",
],
}
Name Description Source
rsyring@meld:~/projects/kilo-src$ mise task edit foobar
mise failed read_to_string: ~/projects/kilo-src/.mise/.mise/tasks/foobar
mise No such file or directory (os error 2)
mise Run with --verbose or MISE_VERBOSE=1 for more information
Note that ".mise/.mise" is in the path to the file being edited.
I believe this has been fixed by #1482
yes this works now.