[BUGFIX] Provide gitPath for Windows to avoid failures on windows-2022 (GitHub-hosted runner)#137
Conversation
|
@sebastiankugler 👀 please 🙂 |
sebastiankugler
left a comment
There was a problem hiding this comment.
Seems reasonable, correct and in line with how we treat the other executables.
|
All checks have failed, should I worry @sebastiankugler ? |
|
We need to understand ourselves, but we're on it! No need to worry 🙂 |
|
I'm a bit concerned regarding BC: What about people using self-hosted Windows runners where Should we, in general, make all the paths configurable through action inputs? Would a CHANGELOG entry be good enough, given that we're still at Could |
Signed-off-by: Oktawian Chojnacki <[email protected]>
Same here but if current strategy is wrong, this PR won't make it any worse, right? Why would we use agent related from current absolute path and git exec from another location?
That would be definitely a major improvement, one can only benefit from such flexibility. Seems like a bigger feature and effort. |
Signed-off-by: Oktawian Chojnacki <[email protected]>
a96b08e to
4b29c05
Compare
Yeah, valid point. Every change breaks someone's workflow, but maybe we can accept this risk here. |
dist/cleanup.js
Outdated
| homePath: os.homedir(), | ||
| sshAgentPath: 'c://progra~1//git//usr//bin//ssh-agent.exe', | ||
| sshAddPath: 'c://progra~1//git//usr//bin//ssh-add.exe', | ||
| gitPath: 'c://progra~1//git//usr//bin//git.exe' |
There was a problem hiding this comment.
@ochococo Now that I take a step back, what would you think about having homePath, but sshAgentCmd (or ...Command) and the same for other items that refer to binaries?
I can make the change for you if you agree.
There was a problem hiding this comment.
I would then argue this is not a command but rather a path to command (or executable if you will).
Bike-shedding obviously, not a strong objection from me, UTY
|
The problem with the workflows probably is that secrets are not available when the workflows are started for PRs from external contributors. Not sure yet how to best address this. |
Problem:
Observed error on
windows-2022(GitHub-hosted runner) thatgitcommand cannot be found.Issue:
Cannot find git executable on on windows-2022 (GitHub-hosted runner) #136
Solution:
This path improvement makes use of existing
path.jsto resolve and return correctgit.exepath for Windows, leaving the executable name as it was for other operating systems.Caveats:
No idea how and why this
c://progra~1//git//usr//bin//git.exemumbo-jumbo works but it apparently did for other executables so figured it should work forgit.exe(and it does).