1 parent 916b436 commit 3877a62Copy full SHA for 3877a62
1 file changed
script/translations/download.py
@@ -4,6 +4,7 @@
4
from __future__ import annotations
5
6
import json
7
+import os
8
from pathlib import Path
9
import re
10
import subprocess
@@ -20,13 +21,15 @@
20
21
def run_download_docker():
22
"""Run the Docker image to download the translations."""
23
print("Running Docker to download latest translations.")
- run = subprocess.run(
24
+ result = subprocess.run(
25
[
26
"docker",
27
"run",
28
"-v",
29
f"{DOWNLOAD_DIR}:/opt/dest/locale",
30
"--rm",
31
+ "--user",
32
+ f"{os.getuid()}:{os.getgid()}",
33
f"lokalise/lokalise-cli-2:{CLI_2_DOCKER_IMAGE}",
34
# Lokalise command
35
"lokalise2",
@@ -52,7 +55,7 @@ def run_download_docker():
52
55
)
53
56
print()
54
57
- if run.returncode != 0:
58
+ if result.returncode != 0:
59
raise ExitApp("Failed to download translations")
60
61
0 commit comments