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

Toml task documentation example does not work #4002

Closed
jdx opened this issue Jan 8, 2025 Discussed in #3983 · 0 comments · Fixed by #4067
Closed

Toml task documentation example does not work #4002

jdx opened this issue Jan 8, 2025 Discussed in #3983 · 0 comments · Fixed by #4067

Comments

@jdx
Copy link
Owner

jdx commented Jan 8, 2025

Discussed in #3983

Originally posted by gturi January 7, 2025
I was trying out toml task with usage definition. I slightly modified the command in the example https://mise.jdx.dev/tasks/toml-tasks.html#usage-spec and put it into my config.toml

config.toml

[tasks.test]
usage = '''
arg "file" description="The file to test" default="src/main.rs"
'''
run = 'echo {{arg(name="file")}}'

When I run mise run test hello I get the following error:

[test] ERROR 
   0: Invalid usage config

Location:
   src/task/task_script_parser.rs:305

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
[test] ERROR task failed

mise doctor output:

version: 2025.1.1 linux-x64 (dba7044 2025-01-06)
activated: yes
shims_on_path: no

build_info:
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Mon, 6 Jan 2025 08:26:44 +0000
  Rust Version: rustc 1.83.0 (90b35a623 2024-11-26)
  Profile: release

shell:
  zsh
  zsh 5.9 (x86_64-redhat-linux-gnu)

dirs:
  cache: ~/.cache/mise
  config: ~/.config/mise
  data: ~/.local/share/mise
  shims: ~/.local/share/mise/shims
  state: ~/.local/state/mise

config_files:
  ~/.config/mise/config.toml

ignored_config_files: (none)

backends:
  aqua
  asdf
  cargo
  core
  dotnet
  gem
  go
  npm
  pipx
  spm
  ubi
  vfox

plugins:

toolset:
  ubi:jdx/[email protected]

path:
  ~/.local/share/mise/installs/usage/1.7.4/bin
  /run/user/1000/fnm_multishells/29267_1736283979698/bin
  ~/.local/share/fnm
  /run/user/1000/fnm_multishells/7688_1736270230265/bin
  ~/.local/share/fnm
  /run/user/1000/fnm_multishells/7685_1736270230230/bin
  ~/.local/share/fnm
  ~/.local/bin
  ~/bin
  /usr/local/bin
  /usr/bin
  /bin
  /usr/local/sbin
  /usr/sbin
  /sbin
  ~/.local/share/JetBrains/Toolbox/scripts
  /var/lib/snapd/snap/bin
  ~/Programs/go/bin
  ~/.jdks/temurin-21.0.4/bin
  ~/Programs/gradle-8.10/bin
  ~/.local/share/JetBrains/Toolbox/scripts
  ~/Programs/go/bin
  ~/.jdks/temurin-21.0.4/bin
  ~/Programs/gradle-8.10/bin

env_vars:
  MISE_SHELL=zsh

settings:

No problems found
```</div>
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 a pull request may close this issue.

1 participant