mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +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();
|
||||
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}`
|
||||
].join(os.EOL)
|
||||
);
|
||||
|
|
22
src/utils.ts
22
src/utils.ts
|
@ -158,13 +158,9 @@ async function getWindowsInfo() {
|
|||
}
|
||||
|
||||
async function getMacOSInfo() {
|
||||
const {stdout} = await exec.getExecOutput(
|
||||
'sw_vers',
|
||||
['-productVersion'],
|
||||
{
|
||||
silent: true
|
||||
}
|
||||
);
|
||||
const {stdout} = await exec.getExecOutput('sw_vers', ['-productVersion'], {
|
||||
silent: true
|
||||
});
|
||||
|
||||
const macOSVersion = stdout.trim();
|
||||
|
||||
|
@ -172,13 +168,9 @@ async function getMacOSInfo() {
|
|||
}
|
||||
|
||||
async function getLinuxInfo() {
|
||||
const {stdout} = await exec.getExecOutput(
|
||||
'lsb_release',
|
||||
['-i', '-r', '-s'],
|
||||
{
|
||||
silent: true
|
||||
}
|
||||
);
|
||||
const {stdout} = await exec.getExecOutput('lsb_release', ['-i', '-r', '-s'], {
|
||||
silent: true
|
||||
});
|
||||
|
||||
const [osName, osVersion] = stdout.trim().split('\n');
|
||||
|
||||
|
@ -187,7 +179,7 @@ async function getLinuxInfo() {
|
|||
|
||||
export async function getOSInfo() {
|
||||
let osInfo;
|
||||
if (IS_WINDOWS){
|
||||
if (IS_WINDOWS) {
|
||||
osInfo = await getWindowsInfo();
|
||||
} else if (IS_LINUX) {
|
||||
osInfo = await getLinuxInfo();
|
||||
|
|
Loading…
Add table
Reference in a new issue