mise
mise copied to clipboard
Tasks are executed even if dependencies fail
Describe the bug Tasks get executed even if their dependencies fail (?).
To Reproduce
[tasks.test]
run = [
"echo some broken test",
"false",
]
[tasks.release]
run = "echo release runs anyway"
depends = ["test"]
% mise run release
[test] $ echo some broken test
some broken test
[test] $ false
mise sh exited with non-zero status: exit code 1
[release] $ echo release runs anyway
release runs anyway
Expected behavior
- [GOOD] For the test task to run before the release task, this is happening as expected.
- [GOOD] For the exit code of
mise run releaseto be non-zero, this is also good, we do get a non-zero status. - [BAD] For the release task to be executed only if the test task succeeds, this is not happening, the release task runs even if the tests fail.
mise doctor output
% mise doctor
version: 2024.8.15 linux-x64 (14bab0e 2024-08-28)
activated: yes
shims_on_path: no
build_info:
Target: x86_64-unknown-linux-gnu
Features: DEFAULT, NATIVE_TLS, OPENSSL
Built: Wed, 28 Aug 2024 23:59:30 +0000
Rust Version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)
Profile: release
shell:
/bin/zsh
zsh 5.8.1 (x86_64-koji-linux-gnu)
dirs:
data: ~/.local/share/mise
config: ~/.config/mise
cache: ~/.cache/mise
state: ~/.local/state/mise
shims: ~/.local/share/mise/shims
config_files:
/home~/workspace/mise-test/mise.toml
backends:
cargo
core
go
npm
pipx
spm
ubi
vfox
plugins:
toolset:
env_vars:
MISE_SHELL=zsh
settings:
activate_aggressive = false
all_compile = false
always_keep_download = false
always_keep_install = false
asdf = true
asdf_compat = false
cargo_binstall = true
color = true
disable_default_shorthands = false
disable_tools = []
experimental = true
go_default_packages_file = "~/.default-go-packages"
go_download_mirror = "https://dl.google.com/go"
go_repo = "https://github.com/golang/go"
go_set_gopath = false
go_set_goroot = true
go_skip_checksum = false
http_timeout = 30
jobs = 4
legacy_version_file = true
legacy_version_file_disable_tools = []
libgit2 = true
node_compile = false
not_found_auto_install = true
paranoid = false
pipx_uvx = false
plugin_autoupdate_last_check_duration = "7d"
python_default_packages_file = "~/.default-python-packages"
python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
raw = false
trusted_config_paths = []
quiet = false
use_versions_host = true
verbose = false
vfox = false
yes = false
ci = false
debug = false
trace = false
log_level = "info"
python_venv_auto_create = false
[status]
missing_tools = "if_other_versions_installed"
show_env = false
show_tools = false
Additional context
Output of mise run --trace release
[DEBUG] (1) mise::toolset::builder: [src/toolset/builder.rs:48] Toolset (1.361µs):
[TRACE] (19) mise::cli::run: [src/cli/run.rs:193] running tasks: [test] echo some broken test
[TRACE] (19) mise::cli::run: [src/cli/run.rs:448] last_modified of : None
[TRACE] (19) mise::cli::run: [src/cli/run.rs:448] last_modified of : None
[TRACE] (19) mise::cli::run: [src/cli/run.rs:423] sources: None, outputs: None
[INFO] (19) mise::cli::run: [src/cli/run.rs:286] [test] $ echo some broken test
[DEBUG] (19) mise::cmd: [src/cmd.rs:244] $ sh -c echo some broken test
some broken test
[TRACE] (19) mise::cli::run: [src/cli/run.rs:352] [test] exited successfully
[INFO] (19) mise::cli::run: [src/cli/run.rs:286] [test] $ false
[DEBUG] (19) mise::cmd: [src/cmd.rs:244] $ sh -c false
[ERROR] (19) mise::cli::run: [src/cli/run.rs:195] sh exited with non-zero status: exit code 1
[TRACE] (19) mise::cli::run: [src/cli/run.rs:193] running tasks: [release] echo release runs anyway
[TRACE] (19) mise::cli::run: [src/cli/run.rs:448] last_modified of : None
[TRACE] (19) mise::cli::run: [src/cli/run.rs:448] last_modified of : None
[TRACE] (19) mise::cli::run: [src/cli/run.rs:423] sources: None, outputs: None
[INFO] (19) mise::cli::run: [src/cli/run.rs:286] [release] $ echo release runs anyway
[DEBUG] (19) mise::cmd: [src/cmd.rs:244] $ sh -c echo release runs anyway
release runs anyway
[TRACE] (19) mise::cli::run: [src/cli/run.rs:352] [release] exited successfully
[DEBUG] (1) mise::cli::run: [src/cli/run.rs:218] exiting with status: 1