WatWowMap/ReactMap

checkForUpdates is now broken for docker

Closed this issue · 2 comments

const isDocker = typeof gitRef === 'string' && gitRef.trim()

const gitSha = fs.readFileSync(


ℹ 2023-08-21 09:23:18 [UPDATE] Unable to determine the local git branch, upgrading your version of git will likely resolve this issue: Command failed: git branch --show-current
fatal: detected dubious ownership in repository at '/home/node'
To add an exception for this directory, call:
     git config --global --add safe.directory /home/node

Proceeding normally...
⚠ 2023-08-21 09:23:18 [UPDATE] TypeError: Cannot destructure property 'branch' of '(intermediate value)' as it is undefined.
    at checkForUpdates (/home/node/server/src/services/checkForUpdates.js:78:13)

Behavior was changed lateley in the state management cleanup

the command git branch can only fail with docker, because repo is not checked out, therefore the check can not succeed :)

This check for isDocker must be the first happening in the getCurrentBranch... Only if gitref or gitsha have contents we know we are using docker image -> we need to check those files first, otherwise the git commands are throwing an exception :)

@Fabio1988 can you confirm if this is working in latest devlop?

Thanks, resolved