ansistrano / deploy

Ansible role to deploy scripting applications like PHP, Python, Ruby, etc. in a capistrano style
https://ansistrano.com
MIT License
2.37k stars 343 forks source link

Fix regular expression mistake in Python 3.7 #304

Closed syhe closed 6 years ago

syhe commented 6 years ago

Python 3.7 subtly changed the behavior of re.sub() which leads to paths like ..../.... where they should look like ../...

By matching only non-empty path segments, there is no second adjacent empty match that would be replaced.

Fixes #302

syhe commented 6 years ago

The Travis builds failed because of some SSH errors. My changes seem to be fine. :-)

ricardclau commented 6 years ago

Yeah, as I said in the issue comments thread, Github recently started auditing presence of private keys in repos (which is a good thing) but it sometimes breaks our git private repo tests as the key becomes invalid again

Thanks for supplying a patch working for all Python versions, it would be great if @tz3 @Zorpen or someone else could confirm this working in their setups as well

Zorpen commented 6 years ago

@ricardclau I can confirm that my playbook is working fine now, with Python 3.7