sorenlouv / backport

A simple CLI tool that automates the process of backporting commits on a GitHub repo
https://github.com/sqren/backport/blob/main/docs/config-file-options.md
Apache License 2.0
241 stars 57 forks source link

Fix cloning vs pulling by normalizing path #441

Closed MstrDC closed 1 year ago

MstrDC commented 1 year ago

Fixing issue 440: Problem: On Windows 10 Backport will always clone, because the projectRoot & repoPath never will be equal, even though they do exist. A problem with \ vs / . My solution is to add path.normalize() which should work on both Windows and POSIX. Feel free to adapt my solution as needed.

Test executed: Run 1st time: Repo cloned Run 2nd time: Repo pulled Run 3th time (after deleting the repo): Repo cloned

sorenlouv commented 1 year ago

Change lgtm . Thank you for the help!

sorenlouv commented 1 year ago

Released in 8.9.4. Please try it out and lmk if it works as expected. Thanks!