mirror of
https://github.com/pnpm/action-setup.git
synced 2026-07-05 12:00:39 +00:00
Compare commits
7 Commits
f213155a20
...
87e93ca41f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87e93ca41f | ||
|
|
fc06bc1257 | ||
|
|
b906affcce | ||
|
|
29985b169f | ||
|
|
4a8f7ada16 | ||
|
|
b2ad3f504b | ||
|
|
ab72e3e12e |
BIN
dist/index.js
vendored
BIN
dist/index.js
vendored
Binary file not shown.
@ -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;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user