pyupio / pyup

A tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
https://pyup.io
MIT License
454 stars 67 forks source link

Pyup incorrectly updated a symlink instead of the actual file #360

Open karenc opened 5 years ago

karenc commented 5 years ago

We enabled pyup on one of our repositories that have requirements.txt that are symlinks. It looks something like this:

prod_envs/requirements.txt
prod/requirements.txt -> ../prod_envs/requirements.txt
staging/requirements.txt -> ../prod_envs/requirements.txt

So prod/requirements.txt and staging/requirements.txt both point to prod_envs/requirements.txt. We wanted staging and prod to have the same versions, so we symlinked them to the same file.

What happened was pyup-bot created a commit like this:

- ../prod_envs/requirements.txt
+ Jinja2==2.10.1
+ urllib3==1.25.3

So it's creating a symlink to Jinja2==2.10.1\nurllib3==1.25.3\n and of course that's invalid.

I expect pyup-bot to only update prod_envs/requirements.txt.

(As a workaround, I think I'll configure the bot to not update those symlinked requirements.txt... :thinking:)