Skip to content

Commit

Permalink
fix: do not auto-install on mise x if some tools are passed
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Nov 29, 2024
1 parent 4c12502 commit 35d31a1
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise install
- run: mise x -- bun i
- run: mise run render
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
with:
install_args: bun
cache: true
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: bun i
- run: mise run docs:release
env:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/hyperfine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise install
- run: |
CMDS=(
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise install
- run: mise x -- bun i
- run: mise run release-plz
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ jobs:
- run: tar -C "$HOME" -xvJf "dist/mise-$(./scripts/get-version.sh)-linux-x64.tar.xz"
- run: echo "$HOME/mise/bin" >> "$GITHUB_PATH"
- run: mise -v
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise i
- name: Run e2e tests
uses: nick-fields/retry@v3
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise i
- run: mise x -- wait-for-gh-rate-limit

build-macos:
runs-on: macos-latest
Expand Down Expand Up @@ -108,8 +108,8 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise i
- run: mise x -- wait-for-gh-rate-limit

unit:
strategy:
Expand Down Expand Up @@ -147,6 +147,7 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise install
- run: mise x -- bun i
- run: mise x -- cargo test --all-features
Expand Down Expand Up @@ -178,6 +179,7 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise install
- run: mise run test:shuffle

Expand Down Expand Up @@ -220,7 +222,7 @@ jobs:
~/.local/share/mise
~/.cache/mise
- run: echo "$PWD/target/debug" >> "$GITHUB_PATH" && chmod +x target/debug/mise
- run: mise x -- wait-for-gh-rate-limit
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- name: Test w/ coverage
uses: nick-fields/retry@v3
env:
Expand Down Expand Up @@ -271,6 +273,7 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise install
- name: e2e
uses: nick-fields/retry@v3
Expand Down Expand Up @@ -315,6 +318,7 @@ jobs:
path: |
~/.local/share/mise
~/.cache/mise
- run: mise x wait-for-gh-rate-limit -- wait-for-gh-rate-limit
- run: mise install
- uses: nick-fields/retry@v3
with:
Expand Down
6 changes: 5 additions & 1 deletion src/cli/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ impl Exec {
jobs: self.jobs,
raw: self.raw,
// prevent installing things in shims by checking for tty
missing_args_only: !SETTINGS.exec_auto_install || !console::user_attended_stderr(),
// also don't autoinstall if at least 1 tool is specified
// in that case the user probably just wants that one tool
missing_args_only: !self.tool.is_empty()
|| !SETTINGS.exec_auto_install
|| !console::user_attended_stderr(),
resolve_options: Default::default(),
};
measure!("install_arg_versions", {
Expand Down

0 comments on commit 35d31a1

Please sign in to comment.