diff --git a/dist/setup/index.js b/dist/setup/index.js index f8f14af5..ca9dd134 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -97919,7 +97919,7 @@ async function installPipPackages(pipInstall) { await (0, exec_1.exec)('python', ['-m', 'pip', 'install', ...installArgs]); core.info('Successfully installed pip packages'); } - catch (error) { + catch { core.setFailed(`Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.`); } } diff --git a/src/setup-python.ts b/src/setup-python.ts index 91a0c176..6ec9a09f 100644 --- a/src/setup-python.ts +++ b/src/setup-python.ts @@ -29,7 +29,7 @@ async function installPipPackages(pipInstall: string) { const installArgs = pipInstall.trim().split(/\s+/); await exec('python', ['-m', 'pip', 'install', ...installArgs]); core.info('Successfully installed pip packages'); - } catch (error) { + } catch { core.setFailed( `Failed to install pip packages from "${pipInstall}". Please verify that the package names, versions, or requirements files provided are correct and installable, that the specified packages and versions can be resolved from PyPI or the configured package index, and that your network connection is stable and allows access to the package index.` );