Skip to content

Commit a7c3d80

Browse files
authored
fix: building devcontainer from windows host failing on translations (#215)
https://stackoverflow.com/questions/41219148/shell-strange-string-concatenation-behavior
1 parent 72cd1a6 commit a7c3d80

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
# from the other because of the line ending (\r vs \r\n)
44
* text=auto
55
*.sh text eol=lf
6+
*.env* text eol=lf

download_translations.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ display_error() {
55
exit 1
66
}
77

8-
if [[ -z "${PUBLIC_TOLGEE_API_URL}" ]]; then
8+
if [ -z "${PUBLIC_TOLGEE_API_URL}" ]; then
99
display_error "PUBLIC_TOLGEE_API_URL"
1010
else
11-
echo "Using PUBLIC_TOLGEE_API_URL of $PUBLIC_TOLGEE_API_URL"
11+
echo "Using PUBLIC_TOLGEE_API_URL of ${PUBLIC_TOLGEE_API_URL}"
1212
fi
1313

14-
if [[ -z "${PUBLIC_TOLGEE_API_KEY}" ]]; then
14+
if [ -z "${PUBLIC_TOLGEE_API_KEY}" ]; then
1515
display_error "PUBLIC_TOLGEE_API_KEY"
1616
else
17-
echo "Using PUBLIC_TOLGEE_API_KEY of $PUBLIC_TOLGEE_API_KEY"
17+
echo "Using PUBLIC_TOLGEE_API_KEY of ${PUBLIC_TOLGEE_API_KEY}"
1818
fi
1919

20-
curl "$PUBLIC_TOLGEE_API_URL/v2/projects/export" -H "X-API-Key: $PUBLIC_TOLGEE_API_KEY" --output translations.zip
20+
CURL_URL="${PUBLIC_TOLGEE_API_URL}/v2/projects/export"
2121

22-
if ! curl "$PUBLIC_TOLGEE_API_URL/v2/projects/export" -H "X-API-Key: $PUBLIC_TOLGEE_API_KEY" --output translations.zip; then
22+
if ! curl $CURL_URL -H "X-API-Key: ${PUBLIC_TOLGEE_API_KEY}" --output translations.zip; then
2323
echo "Failed to download translation zip file? Tried using URL:"
24-
echo "$PUBLIC_TOLGEE_API_URL/v2/projects/export"
24+
echo $CURL_URL
2525
exit 1
2626
fi
2727

0 commit comments

Comments
 (0)