mirror of
https://github.com/actions/setup-python.git
synced 2025-12-19 23:07:10 +00:00
wip
Signed-off-by: Jean-Yves LENHOF <jeanyves.lenhof.partner@decathlon.com>
This commit is contained in:
parent
4a23520ba4
commit
bf9c5d876c
3 changed files with 10 additions and 14 deletions
|
|
@ -19,16 +19,12 @@ export async function run(earlyExit?: boolean) {
|
|||
if (earlyExit) {
|
||||
process.exit(0);
|
||||
}
|
||||
// Optionally clean up pip packages after the post-action if requested.
|
||||
// This mirrors the `preclean-pip` behavior used in the main action.
|
||||
try {
|
||||
const postcleanPip = core.getBooleanInput('postclean-pip');
|
||||
if (postcleanPip) {
|
||||
await cleanPipPackages();
|
||||
}
|
||||
} catch (err) {
|
||||
// getBooleanInput throws if input missing in some contexts; ignore and continue
|
||||
}
|
||||
}
|
||||
// Optionally clean up pip packages after the post-action if requested.
|
||||
// This mirrors the `preclean-pip` behavior used in the main action.
|
||||
const postcleanPip = core.getBooleanInput('postclean');
|
||||
if (postcleanPip) {
|
||||
await cleanPipPackages();
|
||||
}
|
||||
} catch (error) {
|
||||
const err = error as Error;
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ async function run() {
|
|||
if (cache && isCacheFeatureAvailable()) {
|
||||
await cacheDependencies(cache, pythonVersion);
|
||||
}
|
||||
const precleanPip = core.getBooleanInput('preclean-pip');
|
||||
const precleanPip = core.getBooleanInput('preclean');
|
||||
if (precleanPip) {
|
||||
await cleanPipPackages();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue