Commit 9031a43e authored by Michal Čihař's avatar Michal Čihař

Hook scripts are executed with VCS root as current directory.

Issue #790
Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 2b26289a
......@@ -224,6 +224,9 @@ Their naming quite clearly tells when given script is executed. The commit
related scripts always get one parameter with full path to the translation file
which has been changed.
The script is executed with the current directory set to root of VCS repository
for given component.
.. seealso::
:setting:`POST_UPDATE_SCRIPTS`,
......
......@@ -14,6 +14,7 @@ Released on ? 2015.
* Added support for Bitbucket webhooks.
* Tigher control on fuzzy strings on translation upload.
* Several URLs have changed, you might have to update your bookmarks.
* Hook scripts are executed with VCS root as current directory.
weblate 2.3
-----------
......
......@@ -1508,7 +1508,8 @@ class SubProject(models.Model, PercentMixin, URLMixin, PathMixin):
try:
subprocess.check_call(
command,
env=environment
env=environment,
cwd=self.get_path(),
)
return True
except (OSError, subprocess.CalledProcessError) as err:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment