Skip to content

Commit

Permalink
fix: display error message from calling usage (#1786)
Browse files Browse the repository at this point in the history
* fix: display error message from calling `usage`

* ci: set GITHUB_TOKEN to cause linting modifications to trigger CI

* [MegaLinter] Apply linters fixes

---------

Co-authored-by: jdx <[email protected]>
  • Loading branch information
jdx and jdx authored Mar 16, 2024
1 parent ec8dbdf commit 63fc69b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN || secrets.GITHUB_TOKEN }}

# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
# improve performance
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
) &&
!contains(github.event.head_commit.message, 'skip fix')
with:
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN || secrets.GITHUB_TOKEN }}
commit-message: "[MegaLinter] Apply linters automatic fixes"
title: "[MegaLinter] Apply linters automatic fixes"
labels: bot
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ secrets.RTX_GITHUB_BOT_TOKEN || github.token }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: unit
Expand Down
1 change: 1 addition & 0 deletions .idea/mise.iml

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

2 changes: 2 additions & 0 deletions src/cli/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ impl Completion {
)
.run();
if res.is_err() {
debug!("usage command failed, falling back to prerendered completions");
debug!("error: {:?}", res);
return self.prerendered(shell);
}
return Ok(());
Expand Down
Empty file modified tests/cli/data/configs/.config/mise/source.sh
100644 → 100755
Empty file.

0 comments on commit 63fc69b

Please sign in to comment.