mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-16 06:30:32 +00:00
feat: add option to disable shims in PATH (#340)
## Summary
- Add `add_shims_to_path` input (default: `true`) to control whether the
mise shims directory is added to PATH
- Setting this to `false` allows users who already have mise configured
to avoid conflicts with their existing setup
Fixes #337
## Usage
```yaml
- uses: jdx/mise-action@v2
with:
add_shims_to_path: false
```
## Test plan
- [ ] Verify shims are added to PATH by default (existing behavior)
- [ ] Verify shims are NOT added to PATH when `add_shims_to_path: false`
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds `add_shims_to_path` input (default true) to optionally skip
adding `mise/shims` to PATH.
>
> - **Action input/behavior**
> - Add `inputs.add_shims_to_path` (default: `true`).
> - Conditionally add `mise/shims` to `PATH` only when
`add_shims_to_path` is `true`.
> - **Build/dist updates (non-functional to action API)**
> - Minor runtime tweaks in bundled libs: safer `abortSignal`
reassignment, improved `File` stream creation, user-agent OS field
formatting, `randomUUID` fallback for Node, and updated internal SDK
version constants.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
f90b26afa3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
4d93b33924
commit
61e6c4a9e9
4 changed files with 15 additions and 7 deletions
|
|
@ -67,6 +67,10 @@ inputs:
|
|||
required: false
|
||||
default: "false"
|
||||
description: if true, will run `mise reshim --all` after setting up mise
|
||||
add_shims_to_path:
|
||||
required: false
|
||||
default: "true"
|
||||
description: if false, will not add mise shims directory to PATH
|
||||
github_token:
|
||||
required: false
|
||||
description: |
|
||||
|
|
|
|||
8
dist/index.js
generated
vendored
8
dist/index.js
generated
vendored
|
|
@ -50155,9 +50155,11 @@ async function setEnvVars() {
|
|||
}
|
||||
set('MISE_TRUSTED_CONFIG_PATHS', process.cwd());
|
||||
set('MISE_YES', '1');
|
||||
const shimsDir = path.join(miseDir(), 'shims');
|
||||
core.info(`Adding ${shimsDir} to PATH`);
|
||||
core.addPath(shimsDir);
|
||||
if (core.getBooleanInput('add_shims_to_path')) {
|
||||
const shimsDir = path.join(miseDir(), 'shims');
|
||||
core.info(`Adding ${shimsDir} to PATH`);
|
||||
core.addPath(shimsDir);
|
||||
}
|
||||
}
|
||||
async function restoreMiseCache() {
|
||||
core.startGroup('Restoring mise cache');
|
||||
|
|
|
|||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
|
@ -187,9 +187,11 @@ async function setEnvVars(): Promise<void> {
|
|||
set('MISE_TRUSTED_CONFIG_PATHS', process.cwd())
|
||||
set('MISE_YES', '1')
|
||||
|
||||
const shimsDir = path.join(miseDir(), 'shims')
|
||||
core.info(`Adding ${shimsDir} to PATH`)
|
||||
core.addPath(shimsDir)
|
||||
if (core.getBooleanInput('add_shims_to_path')) {
|
||||
const shimsDir = path.join(miseDir(), 'shims')
|
||||
core.info(`Adding ${shimsDir} to PATH`)
|
||||
core.addPath(shimsDir)
|
||||
}
|
||||
}
|
||||
|
||||
async function restoreMiseCache(): Promise<string | undefined> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue