mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 07:22:14 +00:00
Format the code
This commit is contained in:
parent
7c97a81ef3
commit
d9a075e99b
2 changed files with 10 additions and 16 deletions
|
@ -88,7 +88,9 @@ export async function useCpythonVersion(
|
||||||
const osInfo = await getOSInfo();
|
const osInfo = await getOSInfo();
|
||||||
throw new Error(
|
throw new Error(
|
||||||
[
|
[
|
||||||
`The version '${version}' with architecture '${architecture}' was not found for ${osInfo ? osInfo : 'this operating system'}.`,
|
`The version '${version}' with architecture '${architecture}' was not found for ${
|
||||||
|
osInfo ? osInfo : 'this operating system'
|
||||||
|
}.`,
|
||||||
`The list of all available versions can be found here: ${installer.MANIFEST_URL}`
|
`The list of all available versions can be found here: ${installer.MANIFEST_URL}`
|
||||||
].join(os.EOL)
|
].join(os.EOL)
|
||||||
);
|
);
|
||||||
|
|
16
src/utils.ts
16
src/utils.ts
|
@ -158,13 +158,9 @@ async function getWindowsInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getMacOSInfo() {
|
async function getMacOSInfo() {
|
||||||
const {stdout} = await exec.getExecOutput(
|
const {stdout} = await exec.getExecOutput('sw_vers', ['-productVersion'], {
|
||||||
'sw_vers',
|
|
||||||
['-productVersion'],
|
|
||||||
{
|
|
||||||
silent: true
|
silent: true
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
const macOSVersion = stdout.trim();
|
const macOSVersion = stdout.trim();
|
||||||
|
|
||||||
|
@ -172,13 +168,9 @@ async function getMacOSInfo() {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getLinuxInfo() {
|
async function getLinuxInfo() {
|
||||||
const {stdout} = await exec.getExecOutput(
|
const {stdout} = await exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {
|
||||||
'lsb_release',
|
|
||||||
['-i', '-r', '-s'],
|
|
||||||
{
|
|
||||||
silent: true
|
silent: true
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
const [osName, osVersion] = stdout.trim().split('\n');
|
const [osName, osVersion] = stdout.trim().split('\n');
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue