prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
3.38k stars 192 forks source link

Adding a package adds it to pixi.toml even if it failed #2516

Open AlexisTM opened 3 days ago

AlexisTM commented 3 days ago

Checks

Reproducible example

pixi init
pixi add colcon # results as: Cannot solve the request because of: No candidates were found for colcon *.
pixi add cmake # results as: Cannot solve the request because of: No candidates were found for colcon *. 

Issue description

When adding a package, we may have had a typo or maybe we added a non-existent package. Regardless, this package will be added to the toml and will make it fail for all further calls.

Expected behavior

If the package doesn't exist, it shouldn't be added to the toml and report an error the package doesn't exist.