fix return code if no package to clean

This commit is contained in:
Jean-Yves LENHOF 2025-11-18 12:37:14 +01:00
parent 5f9011e653
commit f5a6c01e74

View File

@ -9,7 +9,7 @@ export async function cleanPipPackages() {
// Use a shell so we can pipe the output of pip freeze into xargs
await exec('bash', [
'-c',
'test $(python3 -m pip freeze | wc -l) -gt 0 && python3 -m pip freeze | xargs python3 -m pip uninstall -y'
'test $(python -m pip freeze | wc -l) -gt 0 && python -m pip freeze | xargs python -m pip uninstall -y || true'
]);
core.info('Successfully cleaned up pip packages');
} catch (error) {