Skip to content

Package setup script exit code ignored during package installation #165

@ndrufin-crto

Description

@ndrufin-crto

Description:

When installing a package using cola package install, if a __setup__ entry is defined in the manifest, the associated script is executed. However, the exit code of this script is currently not taken into account. This can lead to misleading results where the installation appears successful even though the setup script has failed.

Example:

$ cola package install --file my_package.zip
Checking access to pip index: https://pypi.company.com/...
curl: (28) Connection timed out after 10002 milliseconds
Error: cannot reach pip index: https://pypi.company.com/
It looks like your VPN is not connected. Connect to your VPN and try again.
Package 'my_package' version 1.2 installed in the dropin repository
$ echo $?
0

Despite the setup script failing due to a network issue, the command exits with status 0, which incorrectly signals success.

Expected Behavior:

The installer should propagate the exit code of the __setup__ script.
If the script fails, the CLI should:

  • Return a non-zero exit code.
  • Clearly indicate that the setup step failed.
  • Suggest how to rerun the setup manually

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions