Skip to content

Commit

Permalink
fix: trap panics in task resolving (#3677)
Browse files Browse the repository at this point in the history
* fix: trap panics in task resolving

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
jdx and autofix-ci[bot] authored Dec 18, 2024
1 parent 1072132 commit 9653a49
Show file tree
Hide file tree
Showing 41 changed files with 140 additions and 233 deletions.
84 changes: 42 additions & 42 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ git2 = "<1"
glob = "0.3"
globset = "0.4"
heck = "0.5"
home = "0.5"
home = "= 0.5.9" # TODO: bump this when we can bump msrv
humantime = "2"
indenter = "0.3"
indexmap = { version = "2", features = ["serde"] }
Expand Down
10 changes: 4 additions & 6 deletions docs/cli/config/set.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ If not provided, the nearest mise.toml file will be used
Examples:

```
mise config set tools.python 3.12
mise config set settings.always_keep_download true
mise config set env.TEST_ENV_VAR ABC
mise config set settings.disable_tools --type list node,rust
```
$ mise config set tools.python 3.12
$ mise config set settings.always_keep_download true
$ mise config set env.TEST_ENV_VAR ABC
$ mise config set settings.disable_tools --type list node,rust
```
# Type for `settings` is inferred
$ mise config set settings.jobs 4
```
4 changes: 0 additions & 4 deletions docs/cli/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,10 @@ Examples:
$ mise en .
$ node -v
v20.0.0
```
```
Skip loading bashrc:
$ mise en -s "bash --norc"
```
```
Skip loading zshrc:
$ mise en -s "zsh -f"
```
12 changes: 4 additions & 8 deletions docs/cli/exec.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# `mise exec`

- **Usage**: `mise exec [FLAGS] [TOOL@VERSION]... [COMMAND]...`
- **Usage**: `mise exec [FLAGS] [TOOL@VERSION]... [-- COMMAND]...`
- **Aliases**: `x`
- **Source code**: [`src/cli/exec.rs`](https://github.com/jdx/mise/blob/main/src/cli/exec.rs)

Expand All @@ -20,7 +20,7 @@ The "--" separates runtimes from the commands to pass along to the subprocess.

Tool(s) to start e.g.: node@20 [email protected]

### `[COMMAND]...`
### `[-- COMMAND]...`

Command string to execute (same as --command)

Expand All @@ -42,16 +42,12 @@ Directly pipe stdin/stdout/stderr from plugin to user Sets --jobs=1
Examples:

```
mise exec node@20 -- node ./app.js # launch app.js using node-20.x
mise x node@20 -- node ./app.js # shorter alias
```
$ mise exec node@20 -- node ./app.js # launch app.js using node-20.x
$ mise x node@20 -- node ./app.js # shorter alias
```
# Specify command as a string:
$ mise exec node@20 [email protected] --command "node -v && python -V"
```
```
# Run a command in a different directory:
$ mise x -C /path/to/project node@20 -- node ./app.js
```
4 changes: 2 additions & 2 deletions docs/cli/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Can also use `MISE_NO_CONFIG=1`
- [`mise doctor path [-f --full]`](/cli/doctor/path.md)
- [`mise en [-s --shell <SHELL>] [DIR]`](/cli/en.md)
- [`mise env [FLAGS] [TOOL@VERSION]...`](/cli/env.md)
- [`mise exec [FLAGS] [TOOL@VERSION]... [COMMAND]...`](/cli/exec.md)
- [`mise exec [FLAGS] [TOOL@VERSION]... [-- COMMAND]...`](/cli/exec.md)
- [`mise fmt [-a --all]`](/cli/fmt.md)
- [`mise generate <SUBCOMMAND>`](/cli/generate.md)
- [`mise generate git-pre-commit [FLAGS]`](/cli/generate/git-pre-commit.md)
Expand Down Expand Up @@ -117,7 +117,7 @@ Can also use `MISE_NO_CONFIG=1`
- [`mise sync python [--pyenv] [--uv]`](/cli/sync/python.md)
- [`mise sync ruby [--brew]`](/cli/sync/ruby.md)
- [`mise tasks [FLAGS] [TASK] <SUBCOMMAND>`](/cli/tasks.md)
- [`mise tasks add [FLAGS] <TASK> [RUN]...`](/cli/tasks/add.md)
- [`mise tasks add [FLAGS] <TASK> [-- RUN]...`](/cli/tasks/add.md)
- [`mise tasks deps [--hidden] [--dot] [TASKS]...`](/cli/tasks/deps.md)
- [`mise tasks edit [-p --path] <TASK>`](/cli/tasks/edit.md)
- [`mise tasks info [-J --json] <TASK>`](/cli/tasks/info.md)
Expand Down
2 changes: 0 additions & 2 deletions docs/cli/latest.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ Examples:
```
$ mise latest node@20 # get the latest version of node 20
20.0.0
```
```
$ mise latest node # get the latest stable version of node
20.0.0
```
2 changes: 0 additions & 2 deletions docs/cli/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ Examples:
# build node-20.0.0 with node-build and link it into mise
$ node-build 20.0.0 ~/.nodes/20.0.0
$ mise link [email protected] ~/.nodes/20.0.0
```
```
# have mise use the python version provided by Homebrew
$ brew install node
$ mise link node@brew $(brew --prefix node)
Expand Down
Loading

0 comments on commit 9653a49

Please sign in to comment.