Closed MstrDC closed 2 years ago
Hi @MstrDC
If that's the case it's a bug. It should check for the presence of the repo in the backport folder (~/.backport/
). If it doesn't exist it will clone the repo:
.backport/backport.debug.log
Thanks!
@sqren , Thanks for your quick reponse!
Cool. You have the latest version of the backport tool. This might be a problem specific to Windows. I'm on a Mac but will try to find a Windows machine to reproduce.
@sqren ,
I can confirm that this is on Windows 10.
Looking at this piece of code, I believe a path.normalize needs to be added.
async function getIsRepoCloned(options: ValidConfigOptions): Promise<boolean> { const repoPath = path.normalize(getRepoPath(options)); const projectRoot = await getGitProjectRootPath(repoPath); return repoPath === projectRoot; }
Otherwise it is always false (debugger): projectRoot: "C:/Users/MstrDC/.backport/repositories/backport-org/backport-demo" repoPath: "C:\Users\MstrDC\.backport\repositories\backport-org\backport-demo"
So problem with back/forward slashes?
Thank you so much for diving into this. Much appreciated. Will take a look at the PR.
Thank your for your quick response and action. Closing this issue now.
I noticed that backport always performs a full clone. Why is this? Why after the first clone, doesnt check backport if the data already exists and if so, performs a simple pull? Is there a specific reason for this?