1
0
Fork 0
mirror of https://github.com/overleaf/toolkit.git synced 2025-04-19 07:18:06 +02:00

Fix unquoting of variables

- Fix trimming of matching quote (no star after \1 reference)
- Only trim a single quote (turn any-match into optional match)
This commit is contained in:
Jakob Ackermann 2024-08-20 15:11:21 +01:00
parent d98e9739b1
commit 5bc0e603a7
No known key found for this signature in database
GPG key ID: 30C56800FCA3828A
2 changed files with 6 additions and 2 deletions

View file

@ -1,5 +1,9 @@
# Changelog # Changelog
## 2024-08-20
### Fixed
- Fix unquoting of variables (e.g. `ALL_TEX_LIVE_DOCKER_IMAGES`)
## 2024-08-13 ## 2024-08-13
### Added ### Added
- Updated default [`version`](https://github.com/overleaf/toolkit/blob/master/lib/config-seed/version) to `5.1.1`. - Updated default [`version`](https://github.com/overleaf/toolkit/blob/master/lib/config-seed/version) to `5.1.1`.

View file

@ -180,11 +180,11 @@ function check_sharelatex_env_vars() {
function read_variable() { function read_variable() {
local name=$1 local name=$1
grep -E "^$name=" "$TOOLKIT_ROOT/config/variables.env" \ grep -E "^$name=" "$TOOLKIT_ROOT/config/variables.env" \
| sed -r "s/^$name=([\"']*)(.+)\1*\$/\2/" | sed -r "s/^$name=([\"']?)(.+)\1\$/\2/"
} }
function read_configuration() { function read_configuration() {
local name=$1 local name=$1
grep -E "^$name=" "$TOOLKIT_ROOT/config/overleaf.rc" \ grep -E "^$name=" "$TOOLKIT_ROOT/config/overleaf.rc" \
| sed -r "s/^$name=([\"']*)(.+)\1*\$/\2/" | sed -r "s/^$name=([\"']?)(.+)\1\$/\2/"
} }