feat: allow passing args to install (#87)

This commit is contained in:
jdx 2024-06-01 16:10:28 +00:00 committed by GitHub
parent 1f3aa7e010
commit 5f5bc9d57c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 20 additions and 5 deletions

View file

@ -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> =>