How to avoid "Unable move and reuse existing repository to required location" warning?

Viewed 1006

How do you avoid this warning?

Repository is current at '/home/vsts/work/1/s/env-ppe', move to '/home/vsts/work/1/q'.
##[warning]Unable move and reuse existing repository to required location.

Since there's no variable that gets generated that represents the folder where things are checked out unless it's self

1 Answers

Please check this issue on GitHub. People create a folder before checking out a repo:

- task: PowerShell@2
  displayName: "Create repository folder (workaround)"
  inputs:
    targetType: inline
    script: |
        New-Item -Path . -Name "$(Build.Repository.Name)" -ItemType "directory" # Equals "self"
    pwsh: true
Related