From 873734b1e0d28f56ab70bf8846716c4d950a9573 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Sat, 24 Nov 2018 16:54:34 -0600 Subject: [PATCH] updated docker_startup to fix git permission error --- docker_startup.sh | 6 ++++++ src/client/util/checkLogin.js | 3 +++ 2 files changed, 9 insertions(+) diff --git a/docker_startup.sh b/docker_startup.sh index bd27fad..1a63596 100644 --- a/docker_startup.sh +++ b/docker_startup.sh @@ -22,8 +22,14 @@ if [ -d "/config" ];then CONFDIR="/config" fi +# create home directory with full access that git can access +mkdir -p /home/mykb +chmod 0777 -R /home/mykb + cd /opt/mykb + export NODE_ENV=production +export HOME=/home/mykb if [ -z "$PUID" ];then echo 'no PUID set running as default user' diff --git a/src/client/util/checkLogin.js b/src/client/util/checkLogin.js index c5eba13..af62a9c 100644 --- a/src/client/util/checkLogin.js +++ b/src/client/util/checkLogin.js @@ -32,6 +32,9 @@ export default async function checkLogin(req) { verified: true, jwt, } + } else if (res.status === 400) { + user = {} + delete localStorage.jwt } }) .catch(() => {})