mirror of https://github.com/jdx/mise
docker (#1570)
This commit is contained in:
parent
90e5fac7b8
commit
9019bb1678
|
@ -1,27 +0,0 @@
|
|||
FROM mcr.microsoft.com/devcontainers/rust:1-1-bullseye
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
WORKDIR /workspaces/cached
|
||||
|
||||
# Use another target directory to avoid conflicts with the host target directory
|
||||
ENV CARGO_TARGET_DIR=/workspaces/target
|
||||
RUN mkdir /workspaces/target \
|
||||
# Install rust tools
|
||||
&& rustup component add clippy llvm-tools rustfmt \
|
||||
&& cargo install cargo-insta cargo-llvm-cov \
|
||||
# Install dependencies
|
||||
&& export DEBIAN_FRONTEND=noninteractive \
|
||||
&& curl -fsSL https://deb.nodesource.com/nsolid_setup_deb.sh | bash -s -- 20 \
|
||||
&& apt-get update \
|
||||
&& apt-get -y install --no-install-recommends \
|
||||
# shells, direnv, shellcheck
|
||||
bash fish zsh direnv nodejs \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
# just
|
||||
&& curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin
|
||||
|
||||
COPY --from=golang:1.21-bullseye /usr/local/go/ /usr/local/go/
|
||||
ENV PATH="/usr/local/go/bin:${PATH}"
|
||||
|
||||
ENTRYPOINT [ "/bin/bash" ]
|
|
@ -3,12 +3,12 @@
|
|||
{
|
||||
"name": "Rust",
|
||||
|
||||
// "image": "mcr.microsoft.com/devcontainers/rust:0-1-bullseye",
|
||||
"image": "ghcr.io/jdx/mise:dev",
|
||||
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
},
|
||||
// "build": {
|
||||
// "dockerfile": "Dockerfile",
|
||||
// },
|
||||
|
||||
// Use 'mounts' to make the cargo cache persistent in a Docker Volume.
|
||||
// "mounts": [
|
||||
|
|
|
@ -23,9 +23,8 @@ jobs:
|
|||
flavor:
|
||||
- alpine
|
||||
- deb
|
||||
- github-actions
|
||||
- rpm
|
||||
- mise
|
||||
- rpm
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
@ -53,19 +52,46 @@ jobs:
|
|||
tags: ghcr.io/jdx/mise:${{ matrix.flavor }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
file: packaging/${{ matrix.flavor }}/Dockerfile
|
||||
test:
|
||||
runs-on: ubuntu-22.04
|
||||
container: ghcr.io/jdx/mise:github-actions
|
||||
timeout-minutes: 10
|
||||
dev:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
steps:
|
||||
- run: node -v
|
||||
- run: cargo -V
|
||||
- name: Checkout
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Run cargo nextest
|
||||
run: cargo nextest run --all-features
|
||||
env:
|
||||
RUST_BACKTRACE: "1"
|
||||
- uses: docker/setup-qemu-action@v3
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Extract metadata (tags, labels) for Docker
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
- name: Build and push Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ghcr.io/jdx/mise:dev
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
file: packaging/dev/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
dev-test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/jdx/mise:dev
|
||||
needs: [dev]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cargo install --path . --debug
|
||||
- run: mise install -y
|
||||
- run: mise run test
|
||||
dockerhub:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
|
@ -22,3 +22,4 @@ lcov.info
|
|||
/aur
|
||||
|
||||
megalinter-reports/
|
||||
.dev/
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
tasks.a1 = ["echo a1 1>&2 && sleep 1.5"]
|
||||
tasks.a2 = "echo a2 && sleep 1.0"
|
||||
tasks.b1 = { run = "echo b1 && sleep 1.0", depends = ["a1", "a2"] }
|
||||
tasks.c1 = { run = "echo c1 && sleep 0.5 && echo", depends = ["b1"] }
|
||||
tasks.b1 = { run = "echo b1 && sleep 1.0", depends = ["a1", "a2"], hide = true }
|
||||
tasks.c1 = { run = "echo c1 && sleep 0.5 && echo", depends = ["b1"], hide = true }
|
||||
#tasks.filetask = "echo local"
|
||||
|
||||
[env]
|
||||
|
|
31
.mise.toml
31
.mise.toml
|
@ -33,11 +33,6 @@ run = "cargo build --color always --all-features"
|
|||
sources = ["Cargo.*", "src/**/*.rs"]
|
||||
outputs = ["target/debug/mise"]
|
||||
|
||||
[tasks.test]
|
||||
run = "cargo test"
|
||||
depends = ["clean"]
|
||||
env = { CARGO_TERM_COLOR = "always" }
|
||||
|
||||
[tasks.ci]
|
||||
depends = [
|
||||
"format",
|
||||
|
@ -89,6 +84,16 @@ run = "just lint-fix"
|
|||
[tasks.signal-test]
|
||||
run = "node ./test/fixtures/signal-test.js"
|
||||
|
||||
[tasks.test]
|
||||
run = [
|
||||
"mise run test:unit",
|
||||
"mise run test:e2e",
|
||||
]
|
||||
|
||||
[tasks."test:unit"]
|
||||
run = "cargo test"
|
||||
env = { CARGO_TERM_COLOR = "always" }
|
||||
|
||||
[tasks."test:e2e"]
|
||||
run = "just test-e2e"
|
||||
# TODO: make this work when we have task args
|
||||
|
@ -102,3 +107,19 @@ run = "just test-e2e"
|
|||
# echo ./e2e/run_test "$FILES"
|
||||
#fi
|
||||
#'''
|
||||
|
||||
[tasks."docker:image"]
|
||||
description = "build docker image from Dockerfile"
|
||||
run = 'docker build $root -f $root/packaging/dev/Dockerfile -t ghcr.io/jdx/mise:dev'
|
||||
|
||||
[tasks."docker:cargo"]
|
||||
description = "run cargo inside of development docker container"
|
||||
run = 'docker run -ti --rm -v $root:/mise -w /mise ghcr.io/jdx/mise:dev cargo'
|
||||
|
||||
[tasks."docker:mise"]
|
||||
description = "run mise inside of development docker container"
|
||||
run = "mise run -- docker:cargo run --"
|
||||
|
||||
[tasks."docker:e2e"]
|
||||
description = "run e2e tests inside of development docker container"
|
||||
run = "mise run docker:mise run test:e2e"
|
||||
|
|
|
@ -1358,7 +1358,6 @@ dependencies = [
|
|||
"toml",
|
||||
"toml_edit",
|
||||
"url",
|
||||
"velcro",
|
||||
"versions",
|
||||
"walkdir",
|
||||
"which",
|
||||
|
@ -2766,36 +2765,6 @@ version = "0.2.15"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "velcro"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "31c6a51883ba1034757307e06dc4856cd5439ecf6804ce6c90d13d49496196fc"
|
||||
dependencies = [
|
||||
"velcro_macros",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "velcro_core"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "742cf45d07989b7614877e083602a8973890c75a81f47216b238d2f326ec916c"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "velcro_macros"
|
||||
version = "0.5.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b23c806d7b49977e6e12ee6d120ac01dcab702b51c652fdf1a6709ab5b8868c"
|
||||
dependencies = [
|
||||
"syn 1.0.109",
|
||||
"velcro_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "version_check"
|
||||
version = "0.9.4"
|
||||
|
|
|
@ -100,7 +100,6 @@ thiserror = "1.0.56"
|
|||
toml = { version = "0.8.8", features = ["parse"] }
|
||||
toml_edit = { version = "0.21.0", features = ["parse"] }
|
||||
url = "2.5.0"
|
||||
velcro = "0.5.4"
|
||||
versions = { version = "6.1.0" , features=["serde"]}
|
||||
walkdir = "2.4.0"
|
||||
which = "6.0.0"
|
||||
|
|
|
@ -49,7 +49,7 @@ _mise() {
|
|||
(settings) __mise_settings_cmd && ret=0 ;;
|
||||
(sh|shell) __mise_shell_cmd && ret=0 ;;
|
||||
(sync) __mise_sync_cmd && ret=0 ;;
|
||||
(t|tasks|task) __mise_task_cmd && ret=0 ;;
|
||||
(t|task|tasks) __mise_tasks_cmd && ret=0 ;;
|
||||
(trust) __mise_trust_cmd && ret=0 ;;
|
||||
(remove|rm|uninstall) __mise_uninstall_cmd && ret=0 ;;
|
||||
(unset) __mise_unset_cmd && ret=0 ;;
|
||||
|
@ -577,14 +577,14 @@ __mise_run_cmd() {
|
|||
'::task:__mise_tasks' \
|
||||
'*::args:' \
|
||||
'(-C --cd)'{-C,--cd}'=[Change to this directory before executing the command]:cd:_directories' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Don'\''t actually run the task(s), just print them in order of execution]' \
|
||||
'(-f --force)'{-f,--force}'[Force the task to run even if outputs are up to date]' \
|
||||
'(-p --prefix)'{-p,--prefix}'[Print stdout/stderr by line, prefixed with the task'\''s label]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Don'\''t actually run the tasks(s), just print them in order of execution]' \
|
||||
'(-f --force)'{-f,--force}'[Force the tasks to run even if outputs are up to date]' \
|
||||
'(-p --prefix)'{-p,--prefix}'[Print stdout/stderr by line, prefixed with the tasks'\''s label]' \
|
||||
'(-i --interleave)'{-i,--interleave}'[Print directly to stdout/stderr instead of by line]' \
|
||||
'*'{-t,--tool}'=[Tool(s) to also add e.g.\: node@20 python@3.10]:tool:__mise_tool_versions' \
|
||||
'(-j --jobs)'{-j,--jobs}'=[Number of tasks to run in parallel]:jobs:' \
|
||||
'(-r --raw)'{-r,--raw}'[Read/write directly to stdin/stdout/stderr instead of by line]' \
|
||||
'--timings[Shows elapsed time after each task]' \
|
||||
'--timings[Shows elapsed time after each tasks]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Suppress non-error messages]' \
|
||||
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
|
||||
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
|
||||
|
@ -725,8 +725,8 @@ __mise_sync_python_cmd() {
|
|||
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
|
||||
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
|
||||
}
|
||||
(( $+functions[__mise_task_cmd] )) ||
|
||||
__mise_task_cmd() {
|
||||
(( $+functions[__mise_tasks_cmd] )) ||
|
||||
__mise_tasks_cmd() {
|
||||
_arguments -s -S \
|
||||
'--no-header[Do not print table header]' \
|
||||
'--hidden[Show hidden tasks]' \
|
||||
|
@ -734,25 +734,25 @@ __mise_task_cmd() {
|
|||
'(-q --quiet)'{-q,--quiet}'[Suppress non-error messages]' \
|
||||
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
|
||||
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]' \
|
||||
'1: :__mise_task_cmds' \
|
||||
'1: :__mise_tasks_cmds' \
|
||||
'*::arg:->args' && ret=0
|
||||
|
||||
case "$state" in
|
||||
(args)
|
||||
curcontext="${curcontext%:*:*}:mise-cmd-$words[1]:"
|
||||
case $words[1] in
|
||||
(deps) __mise_task_deps_cmd && ret=0 ;;
|
||||
(edit) __mise_task_edit_cmd && ret=0 ;;
|
||||
(ls) __mise_task_ls_cmd && ret=0 ;;
|
||||
(r|run) __mise_task_run_cmd && ret=0 ;;
|
||||
(deps) __mise_tasks_deps_cmd && ret=0 ;;
|
||||
(edit) __mise_tasks_edit_cmd && ret=0 ;;
|
||||
(ls) __mise_tasks_ls_cmd && ret=0 ;;
|
||||
(r|run) __mise_tasks_run_cmd && ret=0 ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
}
|
||||
(( $+functions[__mise_task_deps_cmd] )) ||
|
||||
__mise_task_deps_cmd() {
|
||||
(( $+functions[__mise_tasks_deps_cmd] )) ||
|
||||
__mise_tasks_deps_cmd() {
|
||||
_arguments -s -S \
|
||||
'*::tasks:' \
|
||||
'--dot[Display dependencies in DOT format]' \
|
||||
|
@ -761,18 +761,18 @@ __mise_task_deps_cmd() {
|
|||
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
|
||||
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
|
||||
}
|
||||
(( $+functions[__mise_task_edit_cmd] )) ||
|
||||
__mise_task_edit_cmd() {
|
||||
(( $+functions[__mise_tasks_edit_cmd] )) ||
|
||||
__mise_tasks_edit_cmd() {
|
||||
_arguments -s -S \
|
||||
':task:__mise_tasks' \
|
||||
'(-p --path)'{-p,--path}'[Display the path to the task instead of editing it]' \
|
||||
'(-p --path)'{-p,--path}'[Display the path to the tasks instead of editing it]' \
|
||||
'(-C --cd)'{-C,--cd}'=[Change directory before running command]:cd:_directories' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Suppress non-error messages]' \
|
||||
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
|
||||
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
|
||||
}
|
||||
(( $+functions[__mise_task_ls_cmd] )) ||
|
||||
__mise_task_ls_cmd() {
|
||||
(( $+functions[__mise_tasks_ls_cmd] )) ||
|
||||
__mise_tasks_ls_cmd() {
|
||||
_arguments -s -S \
|
||||
'--no-header[Do not print table header]' \
|
||||
'--hidden[Show hidden tasks]' \
|
||||
|
@ -781,20 +781,20 @@ __mise_task_ls_cmd() {
|
|||
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
|
||||
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
|
||||
}
|
||||
(( $+functions[__mise_task_run_cmd] )) ||
|
||||
__mise_task_run_cmd() {
|
||||
(( $+functions[__mise_tasks_run_cmd] )) ||
|
||||
__mise_tasks_run_cmd() {
|
||||
_arguments -s -S \
|
||||
'::task:__mise_tasks' \
|
||||
'*::args:' \
|
||||
'(-C --cd)'{-C,--cd}'=[Change to this directory before executing the command]:cd:_directories' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Don'\''t actually run the task(s), just print them in order of execution]' \
|
||||
'(-f --force)'{-f,--force}'[Force the task to run even if outputs are up to date]' \
|
||||
'(-p --prefix)'{-p,--prefix}'[Print stdout/stderr by line, prefixed with the task'\''s label]' \
|
||||
'(-n --dry-run)'{-n,--dry-run}'[Don'\''t actually run the tasks(s), just print them in order of execution]' \
|
||||
'(-f --force)'{-f,--force}'[Force the tasks to run even if outputs are up to date]' \
|
||||
'(-p --prefix)'{-p,--prefix}'[Print stdout/stderr by line, prefixed with the tasks'\''s label]' \
|
||||
'(-i --interleave)'{-i,--interleave}'[Print directly to stdout/stderr instead of by line]' \
|
||||
'*'{-t,--tool}'=[Tool(s) to also add e.g.\: node@20 python@3.10]:tool:__mise_tool_versions' \
|
||||
'(-j --jobs)'{-j,--jobs}'=[Number of tasks to run in parallel]:jobs:' \
|
||||
'(-r --raw)'{-r,--raw}'[Read/write directly to stdin/stdout/stderr instead of by line]' \
|
||||
'--timings[Shows elapsed time after each task]' \
|
||||
'--timings[Shows elapsed time after each tasks]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Suppress non-error messages]' \
|
||||
'*'{-v,--verbose}'[Show extra output (use -vv for even more)]' \
|
||||
'(-y --yes)'{-y,--yes}'[Answer yes to all confirmation prompts]'
|
||||
|
@ -874,7 +874,7 @@ __mise_version_cmd() {
|
|||
(( $+functions[__mise_watch_cmd] )) ||
|
||||
__mise_watch_cmd() {
|
||||
_arguments -s -S \
|
||||
'*'{-t,--task}'=[Task to run]:task:__mise_tasks' \
|
||||
'*'{-t,--task}'=[Tasks to run]:task:__mise_tasks' \
|
||||
'*::args:' \
|
||||
'*'{-g,--glob}'=[Files to watch]:glob:' \
|
||||
'(-C --cd)'{-C,--cd}'=[Change directory before running command]:cd:_directories' \
|
||||
|
@ -928,20 +928,20 @@ __mise_cmds() {
|
|||
{p,plugins}':Manage plugins'
|
||||
'prune:Delete unused versions of tools'
|
||||
'reshim:rebuilds the shim farm'
|
||||
{r,run}':\[experimental\] Run a task'
|
||||
{r,run}':\[experimental\] Run a tasks'
|
||||
'self-update:Updates mise itself'
|
||||
'set:Manage environment variables'
|
||||
'settings:Manage settings'
|
||||
{sh,shell}':Sets a tool version for the current shell session'
|
||||
'sync:Add tool versions from external tools to mise'
|
||||
{t,task}':\[experimental\] Manage tasks'
|
||||
{t,tasks}':\[experimental\] Manage tasks'
|
||||
'trust:Marks a config file as trusted'
|
||||
{remove,rm,uninstall}':Removes runtime versions'
|
||||
'unset:Remove environment variable(s) from the config file'
|
||||
{up,upgrade}':Upgrades outdated tool versions'
|
||||
{u,use}':Change the active version of a tool locally or globally.'
|
||||
'version:Show mise version'
|
||||
{w,watch}':\[experimental\] Run a task watching for changes'
|
||||
{w,watch}':\[experimental\] Run a tasks watching for changes'
|
||||
'where:Display the installation path for a runtime'
|
||||
'which:Shows the path that a bin name points to'
|
||||
)
|
||||
|
@ -1009,13 +1009,13 @@ __mise_sync_cmds() {
|
|||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
(( $+functions[__mise_task_cmds] )) ||
|
||||
__mise_task_cmds() {
|
||||
(( $+functions[__mise_tasks_cmds] )) ||
|
||||
__mise_tasks_cmds() {
|
||||
local commands; commands=(
|
||||
'deps:\[experimental\] Display a tree visualization of a dependency graph'
|
||||
'edit:\[experimental\] Edit a task with \$EDITOR'
|
||||
'edit:\[experimental\] Edit a tasks with \$EDITOR'
|
||||
'ls:\[experimental\] List available tasks to execute'
|
||||
{r,run}':\[experimental\] Run a task'
|
||||
{r,run}':\[experimental\] Run a tasks'
|
||||
)
|
||||
_describe -t commands 'command' commands "$@"
|
||||
}
|
||||
|
|
|
@ -157,10 +157,10 @@ _mise() {
|
|||
cmd="mise__sync"
|
||||
;;
|
||||
mise,t)
|
||||
cmd="mise__task"
|
||||
cmd="mise__tasks"
|
||||
;;
|
||||
mise,task)
|
||||
cmd="mise__task"
|
||||
mise,tasks)
|
||||
cmd="mise__tasks"
|
||||
;;
|
||||
mise,trust)
|
||||
cmd="mise__trust"
|
||||
|
@ -423,8 +423,8 @@ _mise() {
|
|||
mise__help,sync)
|
||||
cmd="mise__help__sync"
|
||||
;;
|
||||
mise__help,task)
|
||||
cmd="mise__help__task"
|
||||
mise__help,tasks)
|
||||
cmd="mise__help__tasks"
|
||||
;;
|
||||
mise__help,trust)
|
||||
cmd="mise__help__trust"
|
||||
|
@ -519,17 +519,17 @@ _mise() {
|
|||
mise__help__sync,python)
|
||||
cmd="mise__help__sync__python"
|
||||
;;
|
||||
mise__help__task,deps)
|
||||
cmd="mise__help__task__deps"
|
||||
mise__help__tasks,deps)
|
||||
cmd="mise__help__tasks__deps"
|
||||
;;
|
||||
mise__help__task,edit)
|
||||
cmd="mise__help__task__edit"
|
||||
mise__help__tasks,edit)
|
||||
cmd="mise__help__tasks__edit"
|
||||
;;
|
||||
mise__help__task,ls)
|
||||
cmd="mise__help__task__ls"
|
||||
mise__help__tasks,ls)
|
||||
cmd="mise__help__tasks__ls"
|
||||
;;
|
||||
mise__help__task,run)
|
||||
cmd="mise__help__task__run"
|
||||
mise__help__tasks,run)
|
||||
cmd="mise__help__tasks__run"
|
||||
;;
|
||||
mise__plugins,a)
|
||||
cmd="mise__plugins__install"
|
||||
|
@ -675,38 +675,38 @@ _mise() {
|
|||
mise__sync__help,python)
|
||||
cmd="mise__sync__help__python"
|
||||
;;
|
||||
mise__task,deps)
|
||||
cmd="mise__task__deps"
|
||||
mise__tasks,deps)
|
||||
cmd="mise__tasks__deps"
|
||||
;;
|
||||
mise__task,edit)
|
||||
cmd="mise__task__edit"
|
||||
mise__tasks,edit)
|
||||
cmd="mise__tasks__edit"
|
||||
;;
|
||||
mise__task,help)
|
||||
cmd="mise__task__help"
|
||||
mise__tasks,help)
|
||||
cmd="mise__tasks__help"
|
||||
;;
|
||||
mise__task,ls)
|
||||
cmd="mise__task__ls"
|
||||
mise__tasks,ls)
|
||||
cmd="mise__tasks__ls"
|
||||
;;
|
||||
mise__task,r)
|
||||
cmd="mise__task__run"
|
||||
mise__tasks,r)
|
||||
cmd="mise__tasks__run"
|
||||
;;
|
||||
mise__task,run)
|
||||
cmd="mise__task__run"
|
||||
mise__tasks,run)
|
||||
cmd="mise__tasks__run"
|
||||
;;
|
||||
mise__task__help,deps)
|
||||
cmd="mise__task__help__deps"
|
||||
mise__tasks__help,deps)
|
||||
cmd="mise__tasks__help__deps"
|
||||
;;
|
||||
mise__task__help,edit)
|
||||
cmd="mise__task__help__edit"
|
||||
mise__tasks__help,edit)
|
||||
cmd="mise__tasks__help__edit"
|
||||
;;
|
||||
mise__task__help,help)
|
||||
cmd="mise__task__help__help"
|
||||
mise__tasks__help,help)
|
||||
cmd="mise__tasks__help__help"
|
||||
;;
|
||||
mise__task__help,ls)
|
||||
cmd="mise__task__help__ls"
|
||||
mise__tasks__help,ls)
|
||||
cmd="mise__tasks__help__ls"
|
||||
;;
|
||||
mise__task__help,run)
|
||||
cmd="mise__task__help__run"
|
||||
mise__tasks__help,run)
|
||||
cmd="mise__tasks__help__run"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
|
@ -715,7 +715,7 @@ _mise() {
|
|||
|
||||
case "${cmd}" in
|
||||
mise)
|
||||
opts="-C -q -v -y -h -V --cd --debug --log-level --quiet --trace --verbose --yes --help --version activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync task trust uninstall upgrade unset use version watch where which render-completion render-help render-mangen help"
|
||||
opts="-C -q -v -y -h -V --cd --debug --log-level --quiet --trace --verbose --yes --help --version activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall upgrade unset use version watch where which render-completion render-help render-mangen help"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
|
@ -1833,7 +1833,7 @@ _mise() {
|
|||
return 0
|
||||
;;
|
||||
mise__help)
|
||||
opts="activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync task trust uninstall upgrade unset use version watch where which render-completion render-help render-mangen help"
|
||||
opts="activate alias asdf bin-paths cache completion config current deactivate direnv doctor env exec global hook-env hook-not-found implode install latest link local ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall upgrade unset use version watch where which render-completion render-help render-mangen help"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
|
@ -2672,7 +2672,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__help__task)
|
||||
mise__help__tasks)
|
||||
opts="deps edit ls run"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -2686,7 +2686,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__help__task__deps)
|
||||
mise__help__tasks__deps)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -2700,7 +2700,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__help__task__edit)
|
||||
mise__help__tasks__edit)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -2714,7 +2714,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__help__task__ls)
|
||||
mise__help__tasks__ls)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -2728,7 +2728,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__help__task__run)
|
||||
mise__help__tasks__run)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4299,7 +4299,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task)
|
||||
mise__tasks)
|
||||
opts="-C -q -v -y -h --no-header --hidden --cd --debug --log-level --quiet --trace --verbose --yes --help deps edit ls run help"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4331,7 +4331,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__deps)
|
||||
mise__tasks__deps)
|
||||
opts="-C -q -v -y -h --dot --cd --debug --log-level --quiet --trace --verbose --yes --help [TASKS]..."
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4363,7 +4363,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__edit)
|
||||
mise__tasks__edit)
|
||||
opts="-p -C -q -v -y -h --path --cd --debug --log-level --quiet --trace --verbose --yes --help <TASK>"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4395,7 +4395,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__help)
|
||||
mise__tasks__help)
|
||||
opts="deps edit ls run help"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4409,7 +4409,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__help__deps)
|
||||
mise__tasks__help__deps)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4423,7 +4423,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__help__edit)
|
||||
mise__tasks__help__edit)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4437,7 +4437,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__help__help)
|
||||
mise__tasks__help__help)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4451,7 +4451,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__help__ls)
|
||||
mise__tasks__help__ls)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4465,7 +4465,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__help__run)
|
||||
mise__tasks__help__run)
|
||||
opts=""
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 4 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4479,7 +4479,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__ls)
|
||||
mise__tasks__ls)
|
||||
opts="-C -q -v -y -h --no-header --hidden --cd --debug --log-level --quiet --trace --verbose --yes --help"
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
@ -4511,7 +4511,7 @@ _mise() {
|
|||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
return 0
|
||||
;;
|
||||
mise__task__run)
|
||||
mise__tasks__run)
|
||||
opts="-C -n -f -p -i -t -j -r -q -v -y -h --cd --dry-run --force --prefix --interleave --tool --jobs --raw --timings --debug --log-level --quiet --trace --verbose --yes --help [TASK] [ARGS]..."
|
||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
|
||||
|
|
|
@ -5,7 +5,7 @@ complete -kxc mise -s C -l cd -a "(__fish_complete_directories)" -d 'Change dire
|
|||
complete -kxc mise -s q -l quiet -d 'Suppress non-error messages'
|
||||
complete -kxc mise -s v -l verbose -d 'Show extra output (use -vv for even more)'
|
||||
complete -kxc mise -s y -l yes -d 'Answer yes to all confirmation prompts'
|
||||
set -l others activate alias bin-paths cache completion config current deactivate direnv doctor env exec implode install latest link ls ls-remote outdated plugins prune reshim run self-update set settings shell sync task trust uninstall unset upgrade use version watch where which
|
||||
set -l others activate alias bin-paths cache completion config current deactivate direnv doctor env exec implode install latest link ls ls-remote outdated plugins prune reshim run self-update set settings shell sync tasks trust uninstall unset upgrade use version watch where which
|
||||
complete -xc mise -n "not $fssf $others" -a activate -d 'Initializes mise in the current shell session'
|
||||
complete -xc mise -n "not $fssf $others" -a alias -d 'Manage aliases'
|
||||
complete -xc mise -n "not $fssf $others" -a bin-paths -d 'List all the active runtime bin paths'
|
||||
|
@ -28,20 +28,20 @@ complete -xc mise -n "not $fssf $others" -a outdated -d 'Shows outdated tool ver
|
|||
complete -xc mise -n "not $fssf $others" -a plugins -d 'Manage plugins'
|
||||
complete -xc mise -n "not $fssf $others" -a prune -d 'Delete unused versions of tools'
|
||||
complete -xc mise -n "not $fssf $others" -a reshim -d 'rebuilds the shim farm'
|
||||
complete -xc mise -n "not $fssf $others" -a run -d '[experimental] Run a task'
|
||||
complete -xc mise -n "not $fssf $others" -a run -d '[experimental] Run a tasks'
|
||||
complete -xc mise -n "not $fssf $others" -a self-update -d 'Updates mise itself'
|
||||
complete -xc mise -n "not $fssf $others" -a set -d 'Manage environment variables'
|
||||
complete -xc mise -n "not $fssf $others" -a settings -d 'Manage settings'
|
||||
complete -xc mise -n "not $fssf $others" -a shell -d 'Sets a tool version for the current shell session'
|
||||
complete -xc mise -n "not $fssf $others" -a sync -d 'Add tool versions from external tools to mise'
|
||||
complete -xc mise -n "not $fssf $others" -a task -d '[experimental] Manage tasks'
|
||||
complete -xc mise -n "not $fssf $others" -a tasks -d '[experimental] Manage tasks'
|
||||
complete -xc mise -n "not $fssf $others" -a trust -d 'Marks a config file as trusted'
|
||||
complete -xc mise -n "not $fssf $others" -a uninstall -d 'Removes runtime versions'
|
||||
complete -xc mise -n "not $fssf $others" -a unset -d 'Remove environment variable(s) from the config file'
|
||||
complete -xc mise -n "not $fssf $others" -a upgrade -d 'Upgrades outdated tool versions'
|
||||
complete -xc mise -n "not $fssf $others" -a use -d 'Change the active version of a tool locally or globally.'
|
||||
complete -xc mise -n "not $fssf $others" -a version -d 'Show mise version'
|
||||
complete -xc mise -n "not $fssf $others" -a watch -d '[experimental] Run a task watching for changes'
|
||||
complete -xc mise -n "not $fssf $others" -a watch -d '[experimental] Run a tasks watching for changes'
|
||||
complete -xc mise -n "not $fssf $others" -a where -d 'Display the installation path for a runtime'
|
||||
complete -xc mise -n "not $fssf $others" -a which -d 'Shows the path that a bin name points to'
|
||||
|
||||
|
@ -217,16 +217,16 @@ complete -kxc mise -n "$fssf prune" -a "(__mise_plugins)" -d 'Prune only version
|
|||
# reshim
|
||||
|
||||
# run
|
||||
complete -kxc mise -n "$fssf run" -d 'Arguments to pass to the task. Use ":::" to separate tasks'
|
||||
complete -kxc mise -n "$fssf run" -d 'Arguments to pass to the tasks. Use ":::" to separate tasks'
|
||||
complete -kxc mise -n "$fssf run" -s C -l cd -a "(__fish_complete_directories)" -d 'Change to this directory before executing the command'
|
||||
complete -kxc mise -n "$fssf run" -s n -l dry-run -d 'Don'\''t actually run the task(s), just print them in order of execution'
|
||||
complete -kxc mise -n "$fssf run" -s f -l force -d 'Force the task to run even if outputs are up to date'
|
||||
complete -kxc mise -n "$fssf run" -s n -l dry-run -d 'Don'\''t actually run the tasks(s), just print them in order of execution'
|
||||
complete -kxc mise -n "$fssf run" -s f -l force -d 'Force the tasks to run even if outputs are up to date'
|
||||
complete -kxc mise -n "$fssf run" -s i -l interleave -d 'Print directly to stdout/stderr instead of by line'
|
||||
complete -kxc mise -n "$fssf run" -s j -l jobs -d 'Number of tasks to run in parallel'
|
||||
complete -kxc mise -n "$fssf run" -s p -l prefix -d 'Print stdout/stderr by line, prefixed with the task'\''s label'
|
||||
complete -kxc mise -n "$fssf run" -s p -l prefix -d 'Print stdout/stderr by line, prefixed with the tasks'\''s label'
|
||||
complete -kxc mise -n "$fssf run" -s r -l raw -d 'Read/write directly to stdin/stdout/stderr instead of by line'
|
||||
complete -kxc mise -n "$fssf run" -a "(__mise_tasks)" -d 'Task to run'
|
||||
complete -kxc mise -n "$fssf run" -l timings -d 'Shows elapsed time after each task'
|
||||
complete -kxc mise -n "$fssf run" -a "(__mise_tasks)" -d 'Tasks to run'
|
||||
complete -kxc mise -n "$fssf run" -l timings -d 'Shows elapsed time after each tasks'
|
||||
complete -kxc mise -n "$fssf run" -s t -l tool -a "(__mise_tool_versions)" -d 'Tool(s) to also add e.g.: node@20 python@3.10'
|
||||
|
||||
# self-update
|
||||
|
@ -280,39 +280,39 @@ complete -kxc mise -n "$fssf sync; and $fssf node" -l nvm -d 'Get tool versions
|
|||
complete -kxc mise -n "$fssf sync; and $fssf python" -l pyenv -d 'Get tool versions from pyenv'
|
||||
|
||||
|
||||
# task
|
||||
complete -kxc mise -n "$fssf task" -l hidden -d 'Show hidden tasks'
|
||||
complete -kxc mise -n "$fssf task" -l no-header -d 'Do not print table header'
|
||||
# tasks
|
||||
complete -kxc mise -n "$fssf tasks" -l hidden -d 'Show hidden tasks'
|
||||
complete -kxc mise -n "$fssf tasks" -l no-header -d 'Do not print table header'
|
||||
set -l others deps edit ls run
|
||||
complete -xc mise -n "$fssf task; and not $fssf $others" -a deps -d '[experimental] Display a tree visualization of a dependency graph'
|
||||
complete -xc mise -n "$fssf task; and not $fssf $others" -a edit -d '[experimental] Edit a task with $EDITOR'
|
||||
complete -xc mise -n "$fssf task; and not $fssf $others" -a ls -d '[experimental] List available tasks to execute'
|
||||
complete -xc mise -n "$fssf task; and not $fssf $others" -a run -d '[experimental] Run a task'
|
||||
complete -xc mise -n "$fssf tasks; and not $fssf $others" -a deps -d '[experimental] Display a tree visualization of a dependency graph'
|
||||
complete -xc mise -n "$fssf tasks; and not $fssf $others" -a edit -d '[experimental] Edit a tasks with $EDITOR'
|
||||
complete -xc mise -n "$fssf tasks; and not $fssf $others" -a ls -d '[experimental] List available tasks to execute'
|
||||
complete -xc mise -n "$fssf tasks; and not $fssf $others" -a run -d '[experimental] Run a tasks'
|
||||
|
||||
# task deps
|
||||
complete -kxc mise -n "$fssf task; and $fssf deps" -l dot -d 'Display dependencies in DOT format'
|
||||
complete -kxc mise -n "$fssf task; and $fssf deps" -d 'Tasks to show dependencies for'
|
||||
# tasks deps
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf deps" -l dot -d 'Display dependencies in DOT format'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf deps" -d 'Tasks to show dependencies for'
|
||||
|
||||
# task edit
|
||||
complete -kxc mise -n "$fssf task; and $fssf edit" -s p -l path -d 'Display the path to the task instead of editing it'
|
||||
complete -kxc mise -n "$fssf task; and $fssf edit" -a "(__mise_tasks)" -d 'Task to edit'
|
||||
# tasks edit
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf edit" -s p -l path -d 'Display the path to the tasks instead of editing it'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf edit" -a "(__mise_tasks)" -d 'Tasks to edit'
|
||||
|
||||
# task ls
|
||||
complete -kxc mise -n "$fssf task; and $fssf ls" -l hidden -d 'Show hidden tasks'
|
||||
complete -kxc mise -n "$fssf task; and $fssf ls" -l no-header -d 'Do not print table header'
|
||||
# tasks ls
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf ls" -l hidden -d 'Show hidden tasks'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf ls" -l no-header -d 'Do not print table header'
|
||||
|
||||
# task run
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -d 'Arguments to pass to the task. Use ":::" to separate tasks'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s C -l cd -a "(__fish_complete_directories)" -d 'Change to this directory before executing the command'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s n -l dry-run -d 'Don'\''t actually run the task(s), just print them in order of execution'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s f -l force -d 'Force the task to run even if outputs are up to date'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s i -l interleave -d 'Print directly to stdout/stderr instead of by line'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s j -l jobs -d 'Number of tasks to run in parallel'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s p -l prefix -d 'Print stdout/stderr by line, prefixed with the task'\''s label'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s r -l raw -d 'Read/write directly to stdin/stdout/stderr instead of by line'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -a "(__mise_tasks)" -d 'Task to run'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -l timings -d 'Shows elapsed time after each task'
|
||||
complete -kxc mise -n "$fssf task; and $fssf run" -s t -l tool -a "(__mise_tool_versions)" -d 'Tool(s) to also add e.g.: node@20 python@3.10'
|
||||
# tasks run
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -d 'Arguments to pass to the tasks. Use ":::" to separate tasks'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s C -l cd -a "(__fish_complete_directories)" -d 'Change to this directory before executing the command'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s n -l dry-run -d 'Don'\''t actually run the tasks(s), just print them in order of execution'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s f -l force -d 'Force the tasks to run even if outputs are up to date'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s i -l interleave -d 'Print directly to stdout/stderr instead of by line'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s j -l jobs -d 'Number of tasks to run in parallel'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s p -l prefix -d 'Print stdout/stderr by line, prefixed with the tasks'\''s label'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s r -l raw -d 'Read/write directly to stdin/stdout/stderr instead of by line'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -a "(__mise_tasks)" -d 'Tasks to run'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -l timings -d 'Shows elapsed time after each tasks'
|
||||
complete -kxc mise -n "$fssf tasks; and $fssf run" -s t -l tool -a "(__mise_tool_versions)" -d 'Tool(s) to also add e.g.: node@20 python@3.10'
|
||||
|
||||
|
||||
# trust
|
||||
|
@ -354,7 +354,7 @@ complete -kxc mise -n "$fssf use" -a "(__mise_tool_versions)" -d 'Tool(s) to add
|
|||
# watch
|
||||
complete -kxc mise -n "$fssf watch" -d 'Extra arguments'
|
||||
complete -kxc mise -n "$fssf watch" -s g -l glob -d 'Files to watch'
|
||||
complete -kxc mise -n "$fssf watch" -s t -l task -a "(__mise_tasks)" -d 'Task to run'
|
||||
complete -kxc mise -n "$fssf watch" -s t -l task -a "(__mise_tasks)" -d 'Tasks to run'
|
||||
|
||||
# where
|
||||
complete -kxc mise -n "$fssf where" -a "(__mise_tool_versions)" -d 'Tool(s) to look up'
|
||||
|
|
|
@ -864,11 +864,11 @@ Examples:
|
|||
**Aliases:** `r`
|
||||
|
||||
```text
|
||||
[experimental] Run a task
|
||||
[experimental] Run a tasks
|
||||
|
||||
This command will run a task, or multiple tasks in parallel.
|
||||
This command will run a tasks, or multiple tasks in parallel.
|
||||
Tasks may have dependencies on other tasks or on source files.
|
||||
If source is configured on a task, it will only run if the source
|
||||
If source is configured on a tasks, it will only run if the source
|
||||
files have changed.
|
||||
|
||||
Tasks can be defined in .mise.toml or as standalone scripts.
|
||||
|
@ -881,7 +881,7 @@ In .mise.toml, tasks take this form:
|
|||
|
||||
Alternatively, tasks can be defined as standalone scripts.
|
||||
These must be located in the `.mise/tasks` directory.
|
||||
The name of the script will be the name of the task.
|
||||
The name of the script will be the name of the tasks.
|
||||
|
||||
$ cat .mise/tasks/build<<EOF
|
||||
#!/usr/bin/env bash
|
||||
|
@ -893,27 +893,27 @@ Usage: run [OPTIONS] [TASK] [ARGS]...
|
|||
|
||||
Arguments:
|
||||
[TASK]
|
||||
Task to run
|
||||
Tasks to run
|
||||
Can specify multiple tasks by separating with `:::`
|
||||
e.g.: mise run task1 arg1 arg2 ::: task2 arg1 arg2
|
||||
|
||||
[default: default]
|
||||
|
||||
[ARGS]...
|
||||
Arguments to pass to the task. Use ":::" to separate tasks
|
||||
Arguments to pass to the tasks. Use ":::" to separate tasks
|
||||
|
||||
Options:
|
||||
-C, --cd <CD>
|
||||
Change to this directory before executing the command
|
||||
|
||||
-n, --dry-run
|
||||
Don't actually run the task(s), just print them in order of execution
|
||||
Don't actually run the tasks(s), just print them in order of execution
|
||||
|
||||
-f, --force
|
||||
Force the task to run even if outputs are up to date
|
||||
Force the tasks to run even if outputs are up to date
|
||||
|
||||
-p, --prefix
|
||||
Print stdout/stderr by line, prefixed with the task's label
|
||||
Print stdout/stderr by line, prefixed with the tasks's label
|
||||
Defaults to true if --jobs > 1
|
||||
Configure with `task_output` config or `MISE_TASK_OUTPUT` env var
|
||||
|
||||
|
@ -937,15 +937,15 @@ Options:
|
|||
Configure with `raw` config or `MISE_RAW` env var
|
||||
|
||||
--timings
|
||||
Shows elapsed time after each task
|
||||
Shows elapsed time after each tasks
|
||||
|
||||
Examples:
|
||||
$ mise run lint
|
||||
Runs the "lint" task. This needs to either be defined in .mise.toml
|
||||
Runs the "lint" tasks. This needs to either be defined in .mise.toml
|
||||
or as a standalone script. See the project README for more information.
|
||||
|
||||
$ mise run build --force
|
||||
Forces the "build" task to run even if its sources are up-to-date.
|
||||
Forces the "build" tasks to run even if its sources are up-to-date.
|
||||
|
||||
$ mise run test --raw
|
||||
Runs "test" with stdin/stdout/stderr all connected to the current terminal.
|
||||
|
@ -954,7 +954,7 @@ Examples:
|
|||
$ mise run lint ::: test ::: check
|
||||
Runs the "lint", "test", and "check" tasks in parallel.
|
||||
|
||||
$ mise task cmd1 arg1 arg2 ::: cmd2 arg1 arg2
|
||||
$ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
|
||||
Execute multiple tasks each with their own arguments.
|
||||
```
|
||||
|
||||
|
@ -1176,57 +1176,57 @@ Examples:
|
|||
$ mise use -g python@3.11.0 - uses pyenv-provided python
|
||||
```
|
||||
|
||||
## `mise task deps [OPTIONS] [TASKS]...`
|
||||
## `mise tasks deps [OPTIONS] [TASKS]...`
|
||||
|
||||
```text
|
||||
[experimental] Display a tree visualization of a dependency graph
|
||||
|
||||
Usage: task deps [OPTIONS] [TASKS]...
|
||||
Usage: tasks deps [OPTIONS] [TASKS]...
|
||||
|
||||
Arguments:
|
||||
[TASKS]...
|
||||
Tasks to show dependencies for
|
||||
Can specify multiple tasks by separating with spaces
|
||||
e.g.: mise task deps lint test check
|
||||
e.g.: mise tasks deps lint test check
|
||||
|
||||
Options:
|
||||
--dot
|
||||
Display dependencies in DOT format
|
||||
|
||||
Examples:
|
||||
$ mise task deps
|
||||
$ mise tasks deps
|
||||
Shows dependencies for all tasks
|
||||
|
||||
$ mise task deps lint test check
|
||||
$ mise tasks deps lint test check
|
||||
Shows dependencies for the "lint", "test" and "check" tasks
|
||||
|
||||
$ mise task deps --dot
|
||||
$ mise tasks deps --dot
|
||||
Shows dependencies in DOT format
|
||||
```
|
||||
|
||||
## `mise task edit [OPTIONS] <TASK>`
|
||||
## `mise tasks edit [OPTIONS] <TASK>`
|
||||
|
||||
```text
|
||||
[experimental] Edit a task with $EDITOR
|
||||
[experimental] Edit a tasks with $EDITOR
|
||||
|
||||
The task will be created as a standalone script if it does not already exist.
|
||||
The tasks will be created as a standalone script if it does not already exist.
|
||||
|
||||
Usage: task edit [OPTIONS] <TASK>
|
||||
Usage: tasks edit [OPTIONS] <TASK>
|
||||
|
||||
Arguments:
|
||||
<TASK>
|
||||
Task to edit
|
||||
Tasks to edit
|
||||
|
||||
Options:
|
||||
-p, --path
|
||||
Display the path to the task instead of editing it
|
||||
Display the path to the tasks instead of editing it
|
||||
|
||||
Examples:
|
||||
$ mise task edit build
|
||||
$ mise task edit test
|
||||
$ mise tasks edit build
|
||||
$ mise tasks edit test
|
||||
```
|
||||
|
||||
## `mise task ls [OPTIONS]`
|
||||
## `mise tasks ls [OPTIONS]`
|
||||
|
||||
```text
|
||||
[experimental] List available tasks to execute
|
||||
|
@ -1237,7 +1237,7 @@ So if you have global tasks in ~/.config/mise/tasks/* and project-specific tasks
|
|||
~/myproject/.mise/tasks/*, then they'll both be available but the project-specific
|
||||
tasks will override the global ones if they have the same name.
|
||||
|
||||
Usage: task ls [OPTIONS]
|
||||
Usage: tasks ls [OPTIONS]
|
||||
|
||||
Options:
|
||||
--no-header
|
||||
|
@ -1247,19 +1247,19 @@ Options:
|
|||
Show hidden tasks
|
||||
|
||||
Examples:
|
||||
$ mise task ls
|
||||
$ mise tasks ls
|
||||
```
|
||||
|
||||
## `mise task run [OPTIONS] [TASK] [ARGS]...`
|
||||
## `mise tasks run [OPTIONS] [TASK] [ARGS]...`
|
||||
|
||||
**Aliases:** `r`
|
||||
|
||||
```text
|
||||
[experimental] Run a task
|
||||
[experimental] Run a tasks
|
||||
|
||||
This command will run a task, or multiple tasks in parallel.
|
||||
This command will run a tasks, or multiple tasks in parallel.
|
||||
Tasks may have dependencies on other tasks or on source files.
|
||||
If source is configured on a task, it will only run if the source
|
||||
If source is configured on a tasks, it will only run if the source
|
||||
files have changed.
|
||||
|
||||
Tasks can be defined in .mise.toml or as standalone scripts.
|
||||
|
@ -1272,7 +1272,7 @@ In .mise.toml, tasks take this form:
|
|||
|
||||
Alternatively, tasks can be defined as standalone scripts.
|
||||
These must be located in the `.mise/tasks` directory.
|
||||
The name of the script will be the name of the task.
|
||||
The name of the script will be the name of the tasks.
|
||||
|
||||
$ cat .mise/tasks/build<<EOF
|
||||
#!/usr/bin/env bash
|
||||
|
@ -1280,31 +1280,31 @@ The name of the script will be the name of the task.
|
|||
EOF
|
||||
$ mise run build
|
||||
|
||||
Usage: task run [OPTIONS] [TASK] [ARGS]...
|
||||
Usage: tasks run [OPTIONS] [TASK] [ARGS]...
|
||||
|
||||
Arguments:
|
||||
[TASK]
|
||||
Task to run
|
||||
Tasks to run
|
||||
Can specify multiple tasks by separating with `:::`
|
||||
e.g.: mise run task1 arg1 arg2 ::: task2 arg1 arg2
|
||||
|
||||
[default: default]
|
||||
|
||||
[ARGS]...
|
||||
Arguments to pass to the task. Use ":::" to separate tasks
|
||||
Arguments to pass to the tasks. Use ":::" to separate tasks
|
||||
|
||||
Options:
|
||||
-C, --cd <CD>
|
||||
Change to this directory before executing the command
|
||||
|
||||
-n, --dry-run
|
||||
Don't actually run the task(s), just print them in order of execution
|
||||
Don't actually run the tasks(s), just print them in order of execution
|
||||
|
||||
-f, --force
|
||||
Force the task to run even if outputs are up to date
|
||||
Force the tasks to run even if outputs are up to date
|
||||
|
||||
-p, --prefix
|
||||
Print stdout/stderr by line, prefixed with the task's label
|
||||
Print stdout/stderr by line, prefixed with the tasks's label
|
||||
Defaults to true if --jobs > 1
|
||||
Configure with `task_output` config or `MISE_TASK_OUTPUT` env var
|
||||
|
||||
|
@ -1328,15 +1328,15 @@ Options:
|
|||
Configure with `raw` config or `MISE_RAW` env var
|
||||
|
||||
--timings
|
||||
Shows elapsed time after each task
|
||||
Shows elapsed time after each tasks
|
||||
|
||||
Examples:
|
||||
$ mise run lint
|
||||
Runs the "lint" task. This needs to either be defined in .mise.toml
|
||||
Runs the "lint" tasks. This needs to either be defined in .mise.toml
|
||||
or as a standalone script. See the project README for more information.
|
||||
|
||||
$ mise run build --force
|
||||
Forces the "build" task to run even if its sources are up-to-date.
|
||||
Forces the "build" tasks to run even if its sources are up-to-date.
|
||||
|
||||
$ mise run test --raw
|
||||
Runs "test" with stdin/stdout/stderr all connected to the current terminal.
|
||||
|
@ -1345,7 +1345,7 @@ Examples:
|
|||
$ mise run lint ::: test ::: check
|
||||
Runs the "lint", "test", and "check" tasks in parallel.
|
||||
|
||||
$ mise task cmd1 arg1 arg2 ::: cmd2 arg1 arg2
|
||||
$ mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2
|
||||
Execute multiple tasks each with their own arguments.
|
||||
```
|
||||
|
||||
|
@ -1547,7 +1547,7 @@ Usage: version
|
|||
**Aliases:** `w`
|
||||
|
||||
```text
|
||||
[experimental] Run a task watching for changes
|
||||
[experimental] Run a tasks watching for changes
|
||||
|
||||
Usage: watch [OPTIONS] [ARGS]...
|
||||
|
||||
|
@ -1557,22 +1557,22 @@ Arguments:
|
|||
|
||||
Options:
|
||||
-t, --task <TASK>
|
||||
Task to run
|
||||
Tasks to run
|
||||
|
||||
[default: default]
|
||||
|
||||
-g, --glob <GLOB>
|
||||
Files to watch
|
||||
Defaults to sources from the task(s)
|
||||
Defaults to sources from the tasks(s)
|
||||
|
||||
Examples:
|
||||
$ mise watch -t build
|
||||
Runs the "build" task. Will re-run the task when any of its sources change.
|
||||
Uses "sources" from the task definition to determine which files to watch.
|
||||
Runs the "build" tasks. Will re-run the tasks when any of its sources change.
|
||||
Uses "sources" from the tasks definition to determine which files to watch.
|
||||
|
||||
$ mise watch -t build --glob src/**/*.rs
|
||||
Runs the "build" task but specify the files to watch with a glob pattern.
|
||||
This overrides the "sources" from the task definition.
|
||||
Runs the "build" tasks but specify the files to watch with a glob pattern.
|
||||
This overrides the "sources" from the tasks definition.
|
||||
|
||||
$ mise run -t build --clear
|
||||
Extra arguments are passed to watchexec. See `watchexec --help` for details.
|
||||
|
|
|
@ -5,6 +5,11 @@ source "$(dirname "$0")/assert.sh"
|
|||
|
||||
export MISE_EXPERIMENTAL=1
|
||||
|
||||
if [[ "${MISE_DISABLE_TOOLS:-}" = *deno* ]]; then
|
||||
echo "Skipping deno tests"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cat <<EOF >.deno-version
|
||||
1.35.3
|
||||
EOF
|
||||
|
|
|
@ -13,4 +13,5 @@ assert() {
|
|||
|
||||
mise plugins install poetry && mise i
|
||||
eval "$(mise activate bash)" && _mise_hook
|
||||
mise reshim
|
||||
mise doctor
|
||||
|
|
|
@ -4,6 +4,8 @@ set -euo pipefail
|
|||
source "$(dirname "$0")/assert.sh"
|
||||
|
||||
export MISE_EXPERIMENTAL=1
|
||||
eval "$(mise activate bash --shims)"
|
||||
mise use go@prefix:1.20
|
||||
|
||||
assert "mise x go:github.com/DarthSim/hivemind@v1.1.0 -- hivemind --version" "Hivemind version 1.1.0"
|
||||
chmod -R u+w "$MISE_DATA_DIR/cache/go-"* || true
|
||||
|
|
|
@ -6,4 +6,4 @@ source "$(dirname "$0")/assert.sh"
|
|||
export MISE_EXPERIMENTAL=1
|
||||
|
||||
assert "mise x npm:prettier@3.1.0 -- prettier -v" "3.1.0"
|
||||
assert "mise x npm:@antfu/ni@0.21.12 -- ni -v 2>/dev/null | head -n1" "@antfu/ni v0.21.12"
|
||||
FORCE_COLOR=0 assert "mise x npm:@antfu/ni@0.21.12 -- ni -v 2>/dev/null | head -n1" "@antfu/ni v0.21.12"
|
||||
|
|
|
@ -8,14 +8,14 @@ export MISE_PYTHON_DEFAULT_PACKAGES_FILE="$ROOT/e2e/.default-python-packages"
|
|||
|
||||
cat >.e2e.mise.toml <<EOF
|
||||
[tools]
|
||||
python = {version = "3.12.0", virtualenv=".venv"}
|
||||
python = {version = "3.12.0", virtualenv="{{env.MISE_DATA_DIR}}/venv"}
|
||||
EOF
|
||||
|
||||
mise i
|
||||
mise x -- python -m venv .venv
|
||||
mise x -- python -m venv "$MISE_DATA_DIR/venv"
|
||||
assert_contains "mise x python@3.12.0 -- python --version" "Python 3.12.0"
|
||||
assert_contains "mise env -s bash | grep VIRTUAL_ENV" "$PWD/.venv"
|
||||
assert "mise x -- which python" "$PWD/.venv/bin/python"
|
||||
assert_contains "mise env -s bash | grep VIRTUAL_ENV" "$MISE_DATA_DIR/venv"
|
||||
assert "mise x -- which python" "$MISE_DATA_DIR/venv/bin/python"
|
||||
|
||||
if [ "${TEST_ALL:-}" != 1 ]; then
|
||||
exit
|
||||
|
|
12
justfile
12
justfile
|
@ -17,9 +17,6 @@ alias lf := lint-fix
|
|||
build *args:
|
||||
cargo build --all-features {{ args }}
|
||||
|
||||
watch:
|
||||
watchexec -w src -- just build
|
||||
|
||||
# run all test types
|
||||
test *args: (test-unit args) test-e2e lint
|
||||
|
||||
|
@ -73,15 +70,6 @@ test-coverage:
|
|||
echo "::group::Render lcov report"
|
||||
cargo llvm-cov report --lcov --output-path lcov.info
|
||||
|
||||
# delete built files
|
||||
clean:
|
||||
cargo clean
|
||||
rm -f lcov.info
|
||||
rm -rf e2e/.{asdf,config,local,mise}/
|
||||
rm -rf target
|
||||
rm -rf *.profraw
|
||||
rm -rf coverage
|
||||
|
||||
scripts := "scripts/*.sh e2e/{test_,run_}* e2e/*.sh"
|
||||
|
||||
# clippy, cargo fmt --check, and just --fmt
|
||||
|
|
|
@ -102,7 +102,7 @@ mise\-reshim(1)
|
|||
rebuilds the shim farm
|
||||
.TP
|
||||
mise\-run(1)
|
||||
[experimental] Run a task
|
||||
[experimental] Run a tasks
|
||||
.TP
|
||||
mise\-self\-update(1)
|
||||
Updates mise itself
|
||||
|
@ -119,7 +119,7 @@ Sets a tool version for the current shell session
|
|||
mise\-sync(1)
|
||||
Add tool versions from external tools to mise
|
||||
.TP
|
||||
mise\-task(1)
|
||||
mise\-tasks(1)
|
||||
[experimental] Manage tasks
|
||||
.TP
|
||||
mise\-trust(1)
|
||||
|
@ -141,7 +141,7 @@ mise\-version(1)
|
|||
Show mise version
|
||||
.TP
|
||||
mise\-watch(1)
|
||||
[experimental] Run a task watching for changes
|
||||
[experimental] Run a tasks watching for changes
|
||||
.TP
|
||||
mise\-where(1)
|
||||
Display the installation path for a runtime
|
||||
|
@ -173,8 +173,8 @@ Examples:
|
|||
|
||||
$ mise set NODE_ENV=production Set NODE_ENV=production in config
|
||||
|
||||
$ mise run build Run `build` task
|
||||
$ mise watch build Run `build` task repeatedly when files change
|
||||
$ mise run build Run `build` tasks
|
||||
$ mise watch build Run `build` tasks repeatedly when files change
|
||||
|
||||
$ mise settings Show settings in use
|
||||
$ mise settings set color 0 Disable color by modifying global config file
|
||||
|
|
|
@ -1,66 +1,39 @@
|
|||
FROM ubuntu:22.04
|
||||
FROM mcr.microsoft.com/devcontainers/rust:1
|
||||
LABEL maintainer="jdx"
|
||||
|
||||
ENV PATH="/root/.cargo/bin:${PATH}"
|
||||
ENV CARGO_HOME="/root/.cargo"
|
||||
ENV RUSTUP_HOME="/root/.rustup"
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV TZ=Etc/UTC
|
||||
ENV GOPROXY=direct
|
||||
ENV MISE_EXPERIMENTAL=1
|
||||
ENV MISE_TRUSTED_CONFIG_PATHS="/mise"
|
||||
ENV dev="/mise/.dev"
|
||||
ENV MISE_DATA_DIR="$dev/mise"
|
||||
ENV MISE_STATE_DIR="$dev/mise"
|
||||
ENV MISE_CONFIG_DIR="$dev/mise"
|
||||
ENV MISE_CACHE_DIR="$dev/mise/cache"
|
||||
|
||||
# TODO: deno does not currently support linux/arm64 making it hard to use this on macs
|
||||
ENV MISE_DISABLE_TOOLS="deno"
|
||||
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
autoconf \
|
||||
bash \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
curl \
|
||||
direnv \
|
||||
fd-find \
|
||||
fish \
|
||||
git \
|
||||
gnupg \
|
||||
libbz2-dev \
|
||||
libdb-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libgdbm6 \
|
||||
libgmp-dev \
|
||||
liblzma-dev \
|
||||
libncurses5-dev \
|
||||
libncursesw5-dev \
|
||||
libreadline-dev \
|
||||
libreadline6-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libxml2-dev \
|
||||
libxmlsec1-dev \
|
||||
libyaml-dev \
|
||||
patch \
|
||||
pkg-config \
|
||||
sudo \
|
||||
tk-dev \
|
||||
uuid-dev \
|
||||
xz-utils \
|
||||
zlib1g-dev \
|
||||
zsh \
|
||||
direnv \
|
||||
fd-find \
|
||||
fish \
|
||||
&& ln -s /usr/bin/{fdfind,fd} \
|
||||
&& mkdir -p /etc/apt/keyrings \
|
||||
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends nodejs \
|
||||
&& node -v \
|
||||
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
|
||||
&& curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash \
|
||||
&& rustup install stable && rustup default stable \
|
||||
&& rustup toolchain install nightly --component llvm-tools-preview \
|
||||
&& cargo install \
|
||||
cargo-msrv \
|
||||
&& cargo binstall -y \
|
||||
cargo-deny \
|
||||
cargo-insta \
|
||||
cargo-llvm-cov \
|
||||
cargo-machete \
|
||||
cargo-msrv \
|
||||
cargo-nextest \
|
||||
cross \
|
||||
just \
|
||||
|
@ -72,3 +45,6 @@ RUN apt-get update \
|
|||
&& node -v \
|
||||
&& npm -v \
|
||||
&& just --version
|
||||
# && mkdir -p $dev/cargo \
|
||||
# && mv "$CARGO_HOME/registry" $dev/cargo/registry && ln -s $dev/cargo/registry "$CARGO_HOME/registry" \
|
||||
# && mkdir $dev/cargo/git && ln -s $dev/cargo/git "$CARGO_HOME/git"
|
|
@ -45,7 +45,7 @@ mod set;
|
|||
mod settings;
|
||||
mod shell;
|
||||
mod sync;
|
||||
mod task;
|
||||
mod tasks;
|
||||
mod trust;
|
||||
mod uninstall;
|
||||
mod unset;
|
||||
|
@ -93,7 +93,7 @@ pub enum Commands {
|
|||
Settings(settings::Settings),
|
||||
Shell(shell::Shell),
|
||||
Sync(sync::Sync),
|
||||
Task(task::Task),
|
||||
Tasks(tasks::Tasks),
|
||||
Trust(trust::Trust),
|
||||
Uninstall(uninstall::Uninstall),
|
||||
Upgrade(upgrade::Upgrade),
|
||||
|
@ -150,7 +150,7 @@ impl Commands {
|
|||
Self::Settings(cmd) => cmd.run(),
|
||||
Self::Shell(cmd) => cmd.run(),
|
||||
Self::Sync(cmd) => cmd.run(),
|
||||
Self::Task(cmd) => cmd.run(),
|
||||
Self::Tasks(cmd) => cmd.run(),
|
||||
Self::Trust(cmd) => cmd.run(),
|
||||
Self::Uninstall(cmd) => cmd.run(),
|
||||
Self::Unset(cmd) => cmd.run(),
|
||||
|
@ -252,8 +252,8 @@ static AFTER_LONG_HELP: &str = color_print::cstr!(
|
|||
|
||||
$ <bold>mise set NODE_ENV=production</bold> Set NODE_ENV=production in config
|
||||
|
||||
$ <bold>mise run build</bold> Run `build` task
|
||||
$ <bold>mise watch build</bold> Run `build` task repeatedly when files change
|
||||
$ <bold>mise run build</bold> Run `build` tasks
|
||||
$ <bold>mise watch build</bold> Run `build` tasks repeatedly when files change
|
||||
|
||||
$ <bold>mise settings</bold> Show settings in use
|
||||
$ <bold>mise settings set color 0</bold> Disable color by modifying global config file
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::collections::{BTreeMap, HashSet};
|
||||
use std::collections::BTreeMap;
|
||||
use std::io::Write;
|
||||
use std::iter::once;
|
||||
use std::os::unix::prelude::ExitStatusExt;
|
||||
|
@ -16,7 +16,6 @@ use eyre::Result;
|
|||
use globwalk::GlobWalkerBuilder;
|
||||
use itertools::Itertools;
|
||||
use once_cell::sync::Lazy;
|
||||
use velcro::hash_set;
|
||||
|
||||
use crate::cmd::CmdLineRunner;
|
||||
use crate::config::{Config, Settings};
|
||||
|
@ -31,11 +30,11 @@ use crate::{env, file, ui};
|
|||
|
||||
use super::args::ToolArg;
|
||||
|
||||
/// [experimental] Run a task
|
||||
/// [experimental] Run a tasks
|
||||
///
|
||||
/// This command will run a task, or multiple tasks in parallel.
|
||||
/// This command will run a tasks, or multiple tasks in parallel.
|
||||
/// Tasks may have dependencies on other tasks or on source files.
|
||||
/// If source is configured on a task, it will only run if the source
|
||||
/// If source is configured on a tasks, it will only run if the source
|
||||
/// files have changed.
|
||||
///
|
||||
/// Tasks can be defined in .mise.toml or as standalone scripts.
|
||||
|
@ -48,7 +47,7 @@ use super::args::ToolArg;
|
|||
///
|
||||
/// Alternatively, tasks can be defined as standalone scripts.
|
||||
/// These must be located in the `.mise/tasks` directory.
|
||||
/// The name of the script will be the name of the task.
|
||||
/// The name of the script will be the name of the tasks.
|
||||
///
|
||||
/// $ cat .mise/tasks/build<<EOF
|
||||
/// #!/usr/bin/env bash
|
||||
|
@ -58,13 +57,13 @@ use super::args::ToolArg;
|
|||
#[derive(Debug, clap::Args)]
|
||||
#[clap(visible_alias = "r", verbatim_doc_comment, after_long_help = AFTER_LONG_HELP)]
|
||||
pub struct Run {
|
||||
/// Task to run
|
||||
/// Tasks to run
|
||||
/// Can specify multiple tasks by separating with `:::`
|
||||
/// e.g.: mise run task1 arg1 arg2 ::: task2 arg1 arg2
|
||||
#[clap(verbatim_doc_comment, default_value = "default")]
|
||||
pub task: String,
|
||||
|
||||
/// Arguments to pass to the task. Use ":::" to separate tasks.
|
||||
/// Arguments to pass to the tasks. Use ":::" to separate tasks.
|
||||
#[clap(allow_hyphen_values = true)]
|
||||
pub args: Vec<String>,
|
||||
|
||||
|
@ -72,15 +71,15 @@ pub struct Run {
|
|||
#[clap(short = 'C', long, value_hint = ValueHint::DirPath, long)]
|
||||
pub cd: Option<PathBuf>,
|
||||
|
||||
/// Don't actually run the task(s), just print them in order of execution
|
||||
/// Don't actually run the tasks(s), just print them in order of execution
|
||||
#[clap(long, short = 'n', verbatim_doc_comment)]
|
||||
pub dry_run: bool,
|
||||
|
||||
/// Force the task to run even if outputs are up to date
|
||||
/// Force the tasks to run even if outputs are up to date
|
||||
#[clap(long, short, verbatim_doc_comment)]
|
||||
pub force: bool,
|
||||
|
||||
/// Print stdout/stderr by line, prefixed with the task's label
|
||||
/// Print stdout/stderr by line, prefixed with the tasks's label
|
||||
/// Defaults to true if --jobs > 1
|
||||
/// Configure with `task_output` config or `MISE_TASK_OUTPUT` env var
|
||||
#[clap(long, short, verbatim_doc_comment, overrides_with = "interleave")]
|
||||
|
@ -108,7 +107,7 @@ pub struct Run {
|
|||
#[clap(long, short, verbatim_doc_comment)]
|
||||
pub raw: bool,
|
||||
|
||||
/// Shows elapsed time after each task
|
||||
/// Shows elapsed time after each tasks
|
||||
#[clap(long, alias = "timing", verbatim_doc_comment)]
|
||||
pub timings: bool,
|
||||
|
||||
|
@ -142,7 +141,7 @@ impl Run {
|
|||
.map(|(t, args)| {
|
||||
let tasks = config.tasks_with_aliases().get_matching(&t)?;
|
||||
if tasks.is_empty() {
|
||||
ensure!(t == "default", "no task {} found", style::ered(t));
|
||||
ensure!(t == "default", "no tasks {} found", style::ered(t));
|
||||
|
||||
Ok(vec![self.prompt_for_task(config)?])
|
||||
} else {
|
||||
|
@ -165,6 +164,7 @@ impl Run {
|
|||
let mut env = ts.env_with_path(config)?;
|
||||
if let Some(root) = &config.project_root {
|
||||
env.insert("MISE_PROJECT_ROOT".into(), root.display().to_string());
|
||||
env.insert("root".into(), root.display().to_string());
|
||||
}
|
||||
|
||||
let tasks = Deps::new(config, tasks)?;
|
||||
|
@ -186,7 +186,7 @@ impl Run {
|
|||
let t = task.clone();
|
||||
s.spawn(|_| {
|
||||
let task = t;
|
||||
trace!("running task: {task}");
|
||||
trace!("running tasks: {task}");
|
||||
if let Err(err) = self.run_task(config, &env, &task) {
|
||||
error!("{err}");
|
||||
exit(1);
|
||||
|
@ -216,19 +216,12 @@ impl Run {
|
|||
return Ok(());
|
||||
}
|
||||
|
||||
let mut env: BTreeMap<String, String> = env
|
||||
let env: BTreeMap<String, String> = env
|
||||
.iter()
|
||||
.chain(task.env.iter())
|
||||
.map(|(k, v)| (k.clone(), v.clone()))
|
||||
.collect();
|
||||
|
||||
static COLOR_KEYS: Lazy<HashSet<&str>> =
|
||||
Lazy::new(|| hash_set!("CLICOLOR", "CLICOLOR_FORCE", "FORCE_COLOR", "NO_COLOR"));
|
||||
if console::colors_enabled() && !task.env.keys().any(|k| COLOR_KEYS.contains(k.as_str())) {
|
||||
env.insert("CLICOLOR_FORCE".into(), "1".into());
|
||||
env.insert("FORCE_COLOR".into(), "1".into());
|
||||
}
|
||||
|
||||
let timer = std::time::Instant::now();
|
||||
|
||||
if let Some(file) = &task.file {
|
||||
|
@ -384,7 +377,7 @@ impl Run {
|
|||
);
|
||||
let task_names = tasks.keys().sorted().collect_vec();
|
||||
let mut s = Select::new("Tasks")
|
||||
.description("Select a task to run")
|
||||
.description("Select a tasks to run")
|
||||
.filterable(true);
|
||||
for name in task_names {
|
||||
s = s.option(DemandOption::new(name));
|
||||
|
@ -393,7 +386,7 @@ impl Run {
|
|||
let name = s.run()?;
|
||||
match tasks.get(name) {
|
||||
Some(task) => Ok(task.clone()),
|
||||
None => bail!("no task {} found", style::ered(name)),
|
||||
None => bail!("no tasks {} found", style::ered(name)),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -524,11 +517,11 @@ fn last_modified_file(files: impl IntoIterator<Item = PathBuf>) -> Result<Option
|
|||
static AFTER_LONG_HELP: &str = color_print::cstr!(
|
||||
r#"<bold><underline>Examples:</underline></bold>
|
||||
$ <bold>mise run lint</bold>
|
||||
Runs the "lint" task. This needs to either be defined in .mise.toml
|
||||
Runs the "lint" tasks. This needs to either be defined in .mise.toml
|
||||
or as a standalone script. See the project README for more information.
|
||||
|
||||
$ <bold>mise run build --force</bold>
|
||||
Forces the "build" task to run even if its sources are up-to-date.
|
||||
Forces the "build" tasks to run even if its sources are up-to-date.
|
||||
|
||||
$ <bold>mise run test --raw</bold>
|
||||
Runs "test" with stdin/stdout/stderr all connected to the current terminal.
|
||||
|
@ -537,7 +530,7 @@ static AFTER_LONG_HELP: &str = color_print::cstr!(
|
|||
$ <bold>mise run lint ::: test ::: check</bold>
|
||||
Runs the "lint", "test", and "check" tasks in parallel.
|
||||
|
||||
$ <bold>mise task cmd1 arg1 arg2 ::: cmd2 arg1 arg2</bold>
|
||||
$ <bold>mise tasks cmd1 arg1 arg2 ::: cmd2 arg1 arg2</bold>
|
||||
Execute multiple tasks each with their own arguments.
|
||||
"#
|
||||
);
|
||||
|
|
|
@ -11,10 +11,10 @@ use petgraph::dot::Dot;
|
|||
/// [experimental] Display a tree visualization of a dependency graph
|
||||
#[derive(Debug, clap::Args)]
|
||||
#[clap(verbatim_doc_comment, after_long_help = AFTER_LONG_HELP)]
|
||||
pub struct TaskDeps {
|
||||
pub struct TasksDeps {
|
||||
/// Tasks to show dependencies for
|
||||
/// Can specify multiple tasks by separating with spaces
|
||||
/// e.g.: mise task deps lint test check
|
||||
/// e.g.: mise tasks deps lint test check
|
||||
#[clap(verbatim_doc_comment)]
|
||||
pub tasks: Option<Vec<String>>,
|
||||
|
||||
|
@ -23,7 +23,7 @@ pub struct TaskDeps {
|
|||
pub dot: bool,
|
||||
}
|
||||
|
||||
impl TaskDeps {
|
||||
impl TasksDeps {
|
||||
pub fn run(self) -> Result<()> {
|
||||
let config = Config::try_get()?;
|
||||
let settings = Settings::try_get()?;
|
||||
|
@ -136,19 +136,19 @@ impl TaskDeps {
|
|||
let tasks = config.tasks();
|
||||
let task_names = tasks.keys().sorted().map(style::ecyan).join(", ");
|
||||
let t = style(&t).yellow().for_stderr();
|
||||
eyre!("no task named `{t}` found. Available tasks: {task_names}")
|
||||
eyre!("no tasks named `{t}` found. Available tasks: {task_names}")
|
||||
}
|
||||
}
|
||||
|
||||
static AFTER_LONG_HELP: &str = color_print::cstr!(
|
||||
r#"<bold><underline>Examples:</underline></bold>
|
||||
$ <bold>mise task deps</bold>
|
||||
$ <bold>mise tasks deps</bold>
|
||||
Shows dependencies for all tasks
|
||||
|
||||
$ <bold>mise task deps lint test check</bold>
|
||||
$ <bold>mise tasks deps lint test check</bold>
|
||||
Shows dependencies for the "lint", "test" and "check" tasks
|
||||
|
||||
$ <bold>mise task deps --dot</bold>
|
||||
$ <bold>mise tasks deps --dot</bold>
|
||||
Shows dependencies in DOT format
|
||||
"#
|
||||
);
|
|
@ -4,22 +4,22 @@ use crate::config::{Config, Settings};
|
|||
use crate::task::Task;
|
||||
use crate::{env, file};
|
||||
|
||||
/// [experimental] Edit a task with $EDITOR
|
||||
/// [experimental] Edit a tasks with $EDITOR
|
||||
///
|
||||
/// The task will be created as a standalone script if it does not already exist.
|
||||
/// The tasks will be created as a standalone script if it does not already exist.
|
||||
#[derive(Debug, clap::Args)]
|
||||
#[clap(verbatim_doc_comment, after_long_help = AFTER_LONG_HELP)]
|
||||
pub struct TaskEdit {
|
||||
/// Task to edit
|
||||
pub struct TasksEdit {
|
||||
/// Tasks to edit
|
||||
#[clap()]
|
||||
task: String,
|
||||
|
||||
/// Display the path to the task instead of editing it
|
||||
/// Display the path to the tasks instead of editing it
|
||||
#[clap(long, short, verbatim_doc_comment)]
|
||||
path: bool,
|
||||
}
|
||||
|
||||
impl TaskEdit {
|
||||
impl TasksEdit {
|
||||
pub fn run(self) -> Result<()> {
|
||||
let config = Config::try_get()?;
|
||||
let settings = Settings::try_get()?;
|
||||
|
@ -59,7 +59,7 @@ impl TaskEdit {
|
|||
|
||||
static AFTER_LONG_HELP: &str = color_print::cstr!(
|
||||
r#"<bold><underline>Examples:</underline></bold>
|
||||
$ <bold>mise task edit build</bold>
|
||||
$ <bold>mise task edit test</bold>
|
||||
$ <bold>mise tasks edit build</bold>
|
||||
$ <bold>mise tasks edit test</bold>
|
||||
"#
|
||||
);
|
|
@ -17,7 +17,7 @@ use crate::ui::{style, table};
|
|||
/// tasks will override the global ones if they have the same name.
|
||||
#[derive(Debug, clap::Args)]
|
||||
#[clap(verbatim_doc_comment, after_long_help = AFTER_LONG_HELP)]
|
||||
pub struct TaskLs {
|
||||
pub struct TasksLs {
|
||||
/// Do not print table header
|
||||
#[clap(long, alias = "no-headers", verbatim_doc_comment)]
|
||||
pub no_header: bool,
|
||||
|
@ -27,11 +27,11 @@ pub struct TaskLs {
|
|||
pub hidden: bool,
|
||||
}
|
||||
|
||||
impl TaskLs {
|
||||
impl TasksLs {
|
||||
pub fn run(self) -> Result<()> {
|
||||
let config = Config::try_get()?;
|
||||
let settings = Settings::try_get()?;
|
||||
settings.ensure_experimental("`mise task ls`")?;
|
||||
settings.ensure_experimental("`mise tasks ls`")?;
|
||||
let rows = config
|
||||
.tasks()
|
||||
.iter()
|
||||
|
@ -59,7 +59,7 @@ struct Row {
|
|||
|
||||
impl From<&Task> for Row {
|
||||
fn from(task: &Task) -> Self {
|
||||
// let cmd = task.command_string().unwrap_or_default();
|
||||
// let cmd = tasks.command_string().unwrap_or_default();
|
||||
Self {
|
||||
name: style::nbold(&task.name).bright().to_string(),
|
||||
description: style::nblue(truncate(&task.description, 40)).to_string(),
|
||||
|
@ -80,7 +80,7 @@ fn truncate(s: &str, len: usize) -> String {
|
|||
// TODO: fill this out
|
||||
static AFTER_LONG_HELP: &str = color_print::cstr!(
|
||||
r#"<bold><underline>Examples:</underline></bold>
|
||||
$ <bold>mise task ls</bold>
|
||||
$ <bold>mise tasks ls</bold>
|
||||
"#
|
||||
);
|
||||
|
|
@ -9,20 +9,20 @@ mod ls;
|
|||
|
||||
/// [experimental] Manage tasks
|
||||
#[derive(Debug, clap::Args)]
|
||||
#[clap(visible_alias = "t", alias = "tasks", verbatim_doc_comment)]
|
||||
pub struct Task {
|
||||
#[clap(visible_alias = "t", alias = "task", verbatim_doc_comment)]
|
||||
pub struct Tasks {
|
||||
#[clap(subcommand)]
|
||||
command: Option<Commands>,
|
||||
|
||||
#[clap(flatten)]
|
||||
ls: ls::TaskLs,
|
||||
ls: ls::TasksLs,
|
||||
}
|
||||
|
||||
#[derive(Debug, Subcommand)]
|
||||
enum Commands {
|
||||
Deps(deps::TaskDeps),
|
||||
Edit(edit::TaskEdit),
|
||||
Ls(ls::TaskLs),
|
||||
Deps(deps::TasksDeps),
|
||||
Edit(edit::TasksEdit),
|
||||
Ls(ls::TasksLs),
|
||||
Run(run::Run),
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ impl Commands {
|
|||
}
|
||||
}
|
||||
|
||||
impl Task {
|
||||
impl Tasks {
|
||||
pub fn run(self) -> Result<()> {
|
||||
let cmd = self.command.unwrap_or(Commands::Ls(self.ls));
|
||||
|
|
@ -8,11 +8,11 @@ use crate::cmd;
|
|||
use crate::config::{Config, Settings};
|
||||
use crate::toolset::ToolsetBuilder;
|
||||
|
||||
/// [experimental] Run a task watching for changes
|
||||
/// [experimental] Run a tasks watching for changes
|
||||
#[derive(Debug, clap::Args)]
|
||||
#[clap(visible_alias = "w", verbatim_doc_comment, after_long_help = AFTER_LONG_HELP)]
|
||||
pub struct Watch {
|
||||
/// Task to run
|
||||
/// Tasks to run
|
||||
#[clap(short, long, verbatim_doc_comment, default_value = "default")]
|
||||
task: Vec<String>,
|
||||
|
||||
|
@ -21,22 +21,22 @@ pub struct Watch {
|
|||
args: Vec<String>,
|
||||
|
||||
/// Files to watch
|
||||
/// Defaults to sources from the task(s)
|
||||
/// Defaults to sources from the tasks(s)
|
||||
#[clap(short, long, verbatim_doc_comment)]
|
||||
glob: Vec<String>,
|
||||
// /// Change to this directory before executing the command
|
||||
// #[clap(short = 'C', long, value_hint = ValueHint::DirPath, long)]
|
||||
// pub cd: Option<PathBuf>,
|
||||
//
|
||||
// /// Don't actually run the task(s), just print them in order of execution
|
||||
// /// Don't actually run the tasks(s), just print them in order of execution
|
||||
// #[clap(long, short = 'n', verbatim_doc_comment)]
|
||||
// pub dry_run: bool,
|
||||
//
|
||||
// /// Force the task to run even if outputs are up to date
|
||||
// /// Force the tasks to run even if outputs are up to date
|
||||
// #[clap(long, short, verbatim_doc_comment)]
|
||||
// pub force: bool,
|
||||
//
|
||||
// /// Print stdout/stderr by line, prefixed with the task's label
|
||||
// /// Print stdout/stderr by line, prefixed with the tasks's label
|
||||
// /// Defaults to true if --jobs > 1
|
||||
// /// Configure with `task_output` config or `MISE_TASK_OUTPUT` env var
|
||||
// #[clap(long, short, verbatim_doc_comment, overrides_with = "interleave")]
|
||||
|
@ -88,7 +88,7 @@ impl Watch {
|
|||
.tasks_with_aliases()
|
||||
.get(t)
|
||||
.cloned()
|
||||
.ok_or_else(|| eyre!("Task not found: {t}"))
|
||||
.ok_or_else(|| eyre!("Tasks not found: {t}"))
|
||||
})
|
||||
.collect::<Result<Vec<_>>>()?;
|
||||
let mut args = vec![];
|
||||
|
@ -125,12 +125,12 @@ impl Watch {
|
|||
static AFTER_LONG_HELP: &str = color_print::cstr!(
|
||||
r#"<bold><underline>Examples:</underline></bold>
|
||||
$ <bold>mise watch -t build</bold>
|
||||
Runs the "build" task. Will re-run the task when any of its sources change.
|
||||
Uses "sources" from the task definition to determine which files to watch.
|
||||
Runs the "build" tasks. Will re-run the tasks when any of its sources change.
|
||||
Uses "sources" from the tasks definition to determine which files to watch.
|
||||
|
||||
$ <bold>mise watch -t build --glob src/**/*.rs</bold>
|
||||
Runs the "build" task but specify the files to watch with a glob pattern.
|
||||
This overrides the "sources" from the task definition.
|
||||
Runs the "build" tasks but specify the files to watch with a glob pattern.
|
||||
This overrides the "sources" from the tasks definition.
|
||||
|
||||
$ <bold>mise run -t build --clear</bold>
|
||||
Extra arguments are passed to watchexec. See `watchexec --help` for details.
|
||||
|
|
|
@ -305,10 +305,10 @@ impl Settings {
|
|||
Ok(settings)
|
||||
}
|
||||
|
||||
pub fn hidden_configs() -> HashSet<&'static str> {
|
||||
pub fn hidden_configs() -> &'static HashSet<&'static str> {
|
||||
static HIDDEN_CONFIGS: Lazy<HashSet<&'static str>> =
|
||||
Lazy::new(|| ["ci", "cd", "debug", "env_file", "trace", "log_level"].into());
|
||||
HIDDEN_CONFIGS.clone()
|
||||
&HIDDEN_CONFIGS
|
||||
}
|
||||
|
||||
pub fn reset(cli_settings: Option<SettingsPartial>) {
|
||||
|
|
10
src/shims.rs
10
src/shims.rs
|
@ -29,6 +29,7 @@ pub fn handle_shim() -> Result<()> {
|
|||
}
|
||||
logger::init();
|
||||
let args = env::ARGS.read().unwrap();
|
||||
trace!("shim[{bin_name}] args: {}", args.join(" "));
|
||||
let mut args: Vec<OsString> = args.iter().map(OsString::from).collect();
|
||||
args[0] = which_shim(&env::MISE_BIN_NAME)?.into();
|
||||
let exec = Exec {
|
||||
|
@ -47,6 +48,10 @@ fn which_shim(bin_name: &str) -> Result<PathBuf> {
|
|||
let mut ts = ToolsetBuilder::new().build(&config)?;
|
||||
if let Some((p, tv)) = ts.which(bin_name) {
|
||||
if let Some(bin) = p.which(&tv, bin_name)? {
|
||||
trace!(
|
||||
"shim[{bin_name}] ToolVersion: {tv} bin: {bin}",
|
||||
bin = display_path(&bin)
|
||||
);
|
||||
return Ok(bin);
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +60,10 @@ fn which_shim(bin_name: &str) -> Result<PathBuf> {
|
|||
for tv in ts.install_missing_bin(bin_name)?.unwrap_or_default() {
|
||||
let p = tv.get_forge();
|
||||
if let Some(bin) = p.which(&tv, bin_name)? {
|
||||
trace!(
|
||||
"shim[{bin_name}] NOT_FOUND ToolVersion: {tv} bin: {bin}",
|
||||
bin = display_path(&bin)
|
||||
);
|
||||
return Ok(bin);
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +77,7 @@ fn which_shim(bin_name: &str) -> Result<PathBuf> {
|
|||
}
|
||||
let bin = path.join(bin_name);
|
||||
if bin.exists() {
|
||||
trace!("shim[{bin_name}] SYSTEM {bin}", bin = display_path(&bin));
|
||||
return Ok(bin);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -288,7 +288,7 @@ impl Deps {
|
|||
})
|
||||
}
|
||||
|
||||
// fn pop(&'a mut self) -> Option<&'a Task> {
|
||||
// fn pop(&'a mut self) -> Option<&'a Tasks> {
|
||||
// if let Some(leaf) = self.leaves().first() {
|
||||
// self.remove(&leaf.clone())
|
||||
// } else {
|
||||
|
|
|
@ -22,6 +22,7 @@ fn init() {
|
|||
);
|
||||
env::set_current_dir(env::HOME.join("cwd")).unwrap();
|
||||
env::remove_var("MISE_TRUSTED_CONFIG_PATHS");
|
||||
env::remove_var("MISE_DISABLE_TOOLS");
|
||||
env::set_var("NO_COLOR", "1");
|
||||
env::set_var("MISE_YES", "1");
|
||||
env::set_var("MISE_USE_TOML", "0");
|
||||
|
|
Loading…
Reference in New Issue