mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
Improved error output during setup
This commit is contained in:
parent
654aa00a6e
commit
533746a645
3 changed files with 10 additions and 1 deletions
|
@ -136,7 +136,9 @@ You should specify only a major and minor version if you are okay with the most
|
||||||
|
|
||||||
# Using `setup-python` with a self hosted runner
|
# Using `setup-python` with a self hosted runner
|
||||||
|
|
||||||
If you would like to use `setup-python` and a self-hosted runner, there are a few extra things you need to make sure are set up so that new versions of Python can be downloaded and configured on your runner.
|
Python distributions are only available for the same [environments](https://github.com/actions/virtual-environments#available-environments) that GitHub Actions hosted environments are available for. If you are using an unsupported version of Ubuntu such as `19.04` or an alternative Linux distribution such as Fedora, `setup-python` will not work. If you have a supported `self-hosted` runner and you would like to use `setup-python`, there are a few extra things you need to make sure are set up so that new versions of Python can be downloaded and configured on your runner.
|
||||||
|
|
||||||
|
If you are experience problems while configuring python on your self-hosted runner. Turn on [step debugging](https://github.com/actions/toolkit/blob/main/docs/action-debugging.md#step-debug-logs) to see addition logs.
|
||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
|
|
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -6356,6 +6356,9 @@ function installPython(workingDirectory) {
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout: (data) => {
|
stdout: (data) => {
|
||||||
core.debug(data.toString().trim());
|
core.debug(data.toString().trim());
|
||||||
|
},
|
||||||
|
stderr: (data) => {
|
||||||
|
core.error(data.toString().trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@ import * as core from '@actions/core';
|
||||||
import * as tc from '@actions/tool-cache';
|
import * as tc from '@actions/tool-cache';
|
||||||
import * as exec from '@actions/exec';
|
import * as exec from '@actions/exec';
|
||||||
import {ExecOptions} from '@actions/exec/lib/interfaces';
|
import {ExecOptions} from '@actions/exec/lib/interfaces';
|
||||||
|
import {stderr} from 'process';
|
||||||
|
|
||||||
const TOKEN = core.getInput('token');
|
const TOKEN = core.getInput('token');
|
||||||
const AUTH = !TOKEN || isGhes() ? undefined : `token ${TOKEN}`;
|
const AUTH = !TOKEN || isGhes() ? undefined : `token ${TOKEN}`;
|
||||||
|
@ -38,6 +39,9 @@ async function installPython(workingDirectory: string) {
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout: (data: Buffer) => {
|
stdout: (data: Buffer) => {
|
||||||
core.debug(data.toString().trim());
|
core.debug(data.toString().trim());
|
||||||
|
},
|
||||||
|
stderr: (data: Buffer) => {
|
||||||
|
core.error(data.toString().trim());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue