WeblateOrg / weblate

Web based localization tool with tight version control integration.
https://weblate.org/
GNU General Public License v3.0
4.63k stars 1.02k forks source link

WL_PREVIOUS_HEAD not set when adding a post-update script #2704

Closed UncleSamSwiss closed 5 years ago

UncleSamSwiss commented 5 years ago

Describe the bug When adding a post-update script add-on, the environment variable WL_PREVIOUS_HEAD is set to None which causes self.execute_process(component, command, environment) to fail with the below mentioned error.

To Reproduce Steps to reproduce the behavior:

  1. Create a post-update script add-on
  2. Try to enable it on a translation component (which uses github)
  3. See error

Expected behavior There shouldn't be an error when adding a post-update script add-on.

Screenshots image

image

Server configuration and status

$ docker-compose exec weblate weblate list_versions
 * Weblate 3.6
 * Python 3.7.3rc1
 * Django 2.2
 * Celery 4.3.0
 * celery-batches 0.2
 * six 1.12.0
 * social-auth-core 3.1.0
 * social-auth-app-django 3.1.0
 * django-appconf 1.0.3
 * translate-toolkit 2.3.1
 * translation-finder 1.2
 * Whoosh 2.7.4
 * defusedxml 0.6.0
 * Git 2.20.1
 * Pillow 5.4.1
 * python-dateutil 2.8.0
 * lxml 4.3.2
 * django-crispy-forms 1.7.2
 * django_compressor 2.2
 * djangorestframework 3.9.2
 * user-agents 2.0
 * jellyfish 0.7.1
 * diff-match-patch 20121119
 * pytz 2019.1
 * pyuca 1.2
 * PyYAML 3.13
 * tesserocr 2.4.0
 * Mercurial 4.8.2
 * git-svn 2.20.1
 * hub 2.2.9
 * Database backends: django.db.backends.postgresql
 * Cache backends: avatar:FileBasedCache, default:RedisCache
 * Celery: redis://cache:6379/1, redis://cache:6379/1, regular
 * Platform: Linux 4.14.111-boot2docker (x86_64)
nijel commented 5 years ago

Thank you for your report, the issue you have reported has just been fixed.

UncleSamSwiss commented 5 years ago

Amazing, how quickly that got fixed 👍 🥇 Thanks a lot!