mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-14 05:50:31 +00:00
feat: add option to disable shims in PATH
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 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4d93b33924
commit
f90b26afa3
4 changed files with 37 additions and 30 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: |
|
||||
|
|
|
|||
53
dist/index.js
generated
vendored
53
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
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