1
0
mirror of https://github.com/pnpm/action-setup.git synced 2026-06-23 16:33:50 +08:00
This commit is contained in:
Alex
2026-03-11 16:00:04 +01:00
committed by GitHub
2 changed files with 21 additions and 10 deletions

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +1,27 @@
import { setFailed, startGroup, endGroup } from '@actions/core' import { setFailed, startGroup, endGroup } from "@actions/core";
import { Inputs } from '../inputs' import { Inputs } from "../inputs";
import runSelfInstaller from './run' import runSelfInstaller from "./run";
import { exec } from "child_process";
import { promisify } from "util";
export { runSelfInstaller } export { runSelfInstaller };
const execAsync = promisify(exec);
export async function install(inputs: Inputs) { export async function install(inputs: Inputs) {
startGroup('Running self-installer...') try {
const status = await runSelfInstaller(inputs) await execAsync("pnpm --version");
endGroup() return;
} catch {}
startGroup("Running self-installer...");
const status = await runSelfInstaller(inputs);
endGroup();
if (status) { if (status) {
return setFailed(`Something went wrong, self-installer exits with code ${status}`) return setFailed(
`Something went wrong, self-installer exits with code ${status}`,
);
} }
} }
export default install export default install;