feat: run mise ls (#163)

This commit is contained in:
Ville Skyttä 2025-01-05 17:43:06 -01:00 committed by GitHub
parent 5083fe4689
commit 5e190f2e46
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 5 additions and 1 deletions

2
dist/index.js generated vendored
View file

@ -71499,6 +71499,7 @@ async function run() {
if (core.getBooleanInput('install')) { if (core.getBooleanInput('install')) {
await miseInstall(); await miseInstall();
} }
await miseLs();
} }
catch (err) { catch (err) {
if (err instanceof Error) if (err instanceof Error)
@ -71668,6 +71669,7 @@ function getOS() {
} }
const testMise = async () => mise(['--version']); const testMise = async () => mise(['--version']);
const miseInstall = async () => mise([`install ${core.getInput('install_args')}`]); const miseInstall = async () => mise([`install ${core.getInput('install_args')}`]);
const miseLs = async () => mise([`ls`]);
const mise = async (args) => core.group(`Running mise ${args.join(' ')}`, async () => { const mise = async (args) => core.group(`Running mise ${args.join(' ')}`, async () => {
const cwd = core.getInput('working_directory') || const cwd = core.getInput('working_directory') ||
core.getInput('install_dir') || core.getInput('install_dir') ||

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View file

@ -27,6 +27,7 @@ async function run(): Promise<void> {
if (core.getBooleanInput('install')) { if (core.getBooleanInput('install')) {
await miseInstall() await miseInstall()
} }
await miseLs()
} catch (err) { } catch (err) {
if (err instanceof Error) core.setFailed(err.message) if (err instanceof Error) core.setFailed(err.message)
else throw err else throw err
@ -213,6 +214,7 @@ function getOS(): string {
const testMise = async (): Promise<number> => mise(['--version']) const testMise = async (): Promise<number> => mise(['--version'])
const miseInstall = async (): Promise<number> => const miseInstall = async (): Promise<number> =>
mise([`install ${core.getInput('install_args')}`]) mise([`install ${core.getInput('install_args')}`])
const miseLs = async (): Promise<number> => mise([`ls`])
const mise = async (args: string[]): Promise<number> => const mise = async (args: string[]): Promise<number> =>
core.group(`Running mise ${args.join(' ')}`, async () => { core.group(`Running mise ${args.join(' ')}`, async () => {
const cwd = const cwd =