Format the code

This commit is contained in:
MaksimZhukov 2022-12-05 21:23:44 +01:00
parent 7c97a81ef3
commit d9a075e99b
2 changed files with 10 additions and 16 deletions

View file

@ -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)
); );

View file

@ -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');