Skip to content

Commit 4c96342

Browse files
committed
In order to access several envvars in the sub-shell, need to 'export' them.
Signed-off-by: Tao Lin <[email protected]>
1 parent fe09ee1 commit 4c96342

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/hedgedoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ HELPER_SCRIPT_DIR=$(dirname $(readlink -e $0 2>/dev/null) 2>/dev/null)
2020

2121
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
2222

23-
HEDGEDOC_SERVER="${HEDGEDOC_SERVER:-http://127.0.0.1:3000}"
23+
export HEDGEDOC_SERVER="${HEDGEDOC_SERVER:-http://127.0.0.1:3000}"
2424

2525
OLD_CODIMD_CONFIG_DIR="${HEDGEDOC_CONFIG_DIR:-$XDG_CONFIG_HOME/codimd}"
2626
HEDGEDOC_CONFIG_DIR="${HEDGEDOC_CONFIG_DIR:-$XDG_CONFIG_HOME/$SCRIPTNAME}"
2727
[ -e "$OLD_CODIMD_CONFIG_DIR" ] && [ ! -e "$HEDGEDOC_CONFIG_DIR" ] && mv "$OLD_CODIMD_CONFIG_DIR" "$HEDGEDOC_CONFIG_DIR"
2828

29-
HEDGEDOC_COOKIES_FILE="${HEDGEDOC_COOKIES_FILE:-$HEDGEDOC_CONFIG_DIR/key.conf}"
29+
export HEDGEDOC_COOKIES_FILE="${HEDGEDOC_COOKIES_FILE:-$HEDGEDOC_CONFIG_DIR/key.conf}"
3030

3131
# Auto-create XDG compliant config dir (https://www.ctrl.blog/entry/xdg-basedir-scripting)
3232
mkdir -p "$HEDGEDOC_CONFIG_DIR"

0 commit comments

Comments
 (0)