mirror of
https://github.com/actions/setup-python.git
synced 2025-07-22 13:18:20 +02:00
Add OS info to the error message
This commit is contained in:
parent
1aafadcfb9
commit
6c87c81bbd
3 changed files with 104 additions and 4 deletions
|
@ -1,6 +1,6 @@
|
|||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import {IS_WINDOWS, IS_LINUX} from './utils';
|
||||
import {IS_WINDOWS, IS_LINUX, getOSInfo} from './utils';
|
||||
|
||||
import * as semver from 'semver';
|
||||
|
||||
|
@ -85,9 +85,10 @@ export async function useCpythonVersion(
|
|||
}
|
||||
|
||||
if (!installDir) {
|
||||
const osInfo = await getOSInfo();
|
||||
throw new Error(
|
||||
[
|
||||
`Version ${version} with arch ${architecture} not found`,
|
||||
`Version ${version} with arch ${architecture} not found for ${osInfo}`,
|
||||
`The list of all available versions can be found here: ${installer.MANIFEST_URL}`
|
||||
].join(os.EOL)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue