Skip to content

Commit 5bc0e60

Browse files
committed
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)
1 parent d98e973 commit 5bc0e60

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2024-08-20
4+
### Fixed
5+
- Fix unquoting of variables (e.g. `ALL_TEX_LIVE_DOCKER_IMAGES`)
6+
37
## 2024-08-13
48
### Added
59
- Updated default [`version`](https://github.com/overleaf/toolkit/blob/master/lib/config-seed/version) to `5.1.1`.

lib/shared-functions.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,11 @@ function check_sharelatex_env_vars() {
180180
function read_variable() {
181181
local name=$1
182182
grep -E "^$name=" "$TOOLKIT_ROOT/config/variables.env" \
183-
| sed -r "s/^$name=([\"']*)(.+)\1*\$/\2/"
183+
| sed -r "s/^$name=([\"']?)(.+)\1\$/\2/"
184184
}
185185

186186
function read_configuration() {
187187
local name=$1
188188
grep -E "^$name=" "$TOOLKIT_ROOT/config/overleaf.rc" \
189-
| sed -r "s/^$name=([\"']*)(.+)\1*\$/\2/"
189+
| sed -r "s/^$name=([\"']?)(.+)\1\$/\2/"
190190
}

0 commit comments

Comments
 (0)