mirror of
https://github.com/pnpm/action-setup.git
synced 2026-07-08 17:43:45 +08:00
Compare commits
3 Commits
87e93ca41f
...
update-nod
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c147d3f3ca | ||
|
|
9a52a9ef25 | ||
|
|
aeb1c1fbbe |
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,27 +1,16 @@
|
|||||||
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) {
|
||||||
try {
|
startGroup('Running self-installer...')
|
||||||
await execAsync("pnpm --version");
|
const status = await runSelfInstaller(inputs)
|
||||||
return;
|
endGroup()
|
||||||
} catch {}
|
|
||||||
|
|
||||||
startGroup("Running self-installer...");
|
|
||||||
const status = await runSelfInstaller(inputs);
|
|
||||||
endGroup();
|
|
||||||
|
|
||||||
if (status) {
|
if (status) {
|
||||||
return setFailed(
|
return setFailed(`Something went wrong, self-installer exits with code ${status}`)
|
||||||
`Something went wrong, self-installer exits with code ${status}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default install;
|
export default install
|
||||||
|
|||||||
Reference in New Issue
Block a user