mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-21 00:31:54 +00:00
feat: allow passing args to install (#87)
This commit is contained in:
parent
1f3aa7e010
commit
5f5bc9d57c
6 changed files with 20 additions and 5 deletions
|
|
@ -126,14 +126,19 @@ function getOS(): string {
|
|||
}
|
||||
|
||||
const testMise = async (): Promise<number> => mise(['--version'])
|
||||
const miseInstall = async (): Promise<number> => mise(['install'])
|
||||
const miseInstall = async (): Promise<number> =>
|
||||
mise([`install ${core.getInput('install_args')}`])
|
||||
const mise = async (args: string[]): Promise<number> =>
|
||||
core.group(`Running mise ${args.join(' ')}`, async () => {
|
||||
const cwd =
|
||||
core.getInput('working_directory') ||
|
||||
core.getInput('install_dir') ||
|
||||
process.cwd()
|
||||
return exec.exec('mise', args, { cwd })
|
||||
if (args.length === 1) {
|
||||
return exec.exec(`mise ${args}`, [], { cwd })
|
||||
} else {
|
||||
return exec.exec('mise', args, { cwd })
|
||||
}
|
||||
})
|
||||
|
||||
const writeFile = async (p: fs.PathLike, body: string): Promise<void> =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue