anchor.diff:          )
       )
   )
  -cd %CURRDIR% >NUL
  +cd "%CURRDIR%" >NUL
   GOTO exit
   
   REM Function to clone or update a repo
  
positive.code: ) ELSE (
      powershell -nologo -noprofile -command "try { Invoke-RestMethod -Uri %UPSTREAMAPIURL%/%REPONAME%/releases/latest -Headers @{'Authorization' = 'token %GITHUBTOKEN%'} > latest.json } catch {exit 1}"
  )
  IF NOT %ERRORLEVEL% == 0 ( ECHO Failed getting latest %REPONAME% release & EXIT /B 1 )
  REM Get tag for latest release
  FOR /F "tokens=* USEBACKQ" %%F IN (`TYPE latest.json ^| FINDSTR /B "tag_name"`) DO SET TAG=%%F
  FOR /F "tokens=2 delims=: " %%F in ("%TAG%") DO SET TAG=%%F
  
negative.code: REM Check if git is installed and available
  IF "%MSVC_VER%"=="" (
      git status >NUL 2>&1
      IF ERRORLEVEL 1 (
          ECHO A working copy of git was not found. To use this script you must first install git for windows.
          GOTO exitOnError
      )
  )
  
  REM Store current directory and ensure working directory is the location of current .bat
  SET CURRDIR="%CD%"
  cd "%~dp0"
  
  REM Initialise error check value
  SET ERROR=0
  