Variable Slicer_WC_LAST_CHANGED_DATE is expected to be defined

The same just happened to me because I had move the git source repo with the sources from HOME to /opt/ and changed the ownership. (So even git status here was giving an error)

The error was solved after doing:

git config --global --add safe.directory /opt/Slicer_src