Skip to content

Conversation

@iloveitaly
Copy link
Contributor

@iloveitaly iloveitaly commented Dec 20, 2025

I work on https://railpack.com which heavily uses mise (we love it!). One of the things
we do is parse mise latest output. However, on the initial run of mise latest erlang
the kerl update command is run and the stdout is redirected to the process stdout, which
causes the command output to include the kerl update results. For example:

Getting releases from GitHub...
The available releases are:
17.5.6.10
18.3.4.11
19.3.6.13
20.3.8.26
21.3.8.24
22.3.4.27
23.3.4.20
24.3.4.17
25.3.2.21
26.2.5.16 *
27.3.4.6 *
28.3 *
28.3

This causes two problems:

  1. mise latest erlang* generates indeterminent results. First run looks different than the second.
  2. For our specific purposes, this makes it hard to parse.

This change redirects kerl update stdout + stderr to the trace logs.

@iloveitaly iloveitaly marked this pull request as ready for review December 20, 2025 18:02
Copilot AI review requested due to automatic review settings December 20, 2025 18:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where the kerl update command's output was polluting the stdout of mise latest erlang, causing inconsistent and hard-to-parse results. The fix redirects both stdout and stderr from the kerl update releases command to trace logs.

Key Changes:

  • Capture stdout and stderr from kerl update releases command execution
  • Redirect captured output to trace logs for debugging purposes
  • Remove unused CmdLineRunner import from the file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

#[cfg(linux)]
use crate::cmd::CmdLineRunner;
#[cfg(linux)]
use std::fs;
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the CmdLineRunner import will cause a compilation error. CmdLineRunner is still used on line 150 in the install_precompiled function which is also conditionally compiled with #[cfg(linux)]. The import should be kept to maintain compilation on Linux systems.

Suggested change
use std::fs;
use std::fs;
#[cfg(linux)]
use crate::cmd::CmdLineRunner;

Copilot uses AI. Check for mistakes.
I work on https://railpack.com which heavily uses mise (we love it!). One of the things
we do is parse `mise latest` output. However, on the initial run of `mise latest erlang`
the `kerl update` command is run and the stdout is redirected to the process stdout, which
causes the command output to include the kerl update results. For example:

```
Getting releases from GitHub...
The available releases are:
17.5.6.10
18.3.4.11
19.3.6.13
20.3.8.26
21.3.8.24
22.3.4.27
23.3.4.20
24.3.4.17
25.3.2.21
26.2.5.16 *
27.3.4.6 *
28.3 *
28.3
```

This causes two problems:

1. `mise latest erlang*` generates indeterminent results. First run looks different than the second.
2. For our specific purposes, this makes it hard to parse.

This change redirects `kerl update` stdout + stderr to the trace logs.
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 this pull request may close these issues.

1 participant