[PR #180] [CLOSED] Windows+Docker path reference fixes, mostly around the not relying on filepath.Separator #1376

Closed
opened 2026-03-01 21:50:55 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/nektos/act/pull/180
Author: @syntaqx
Created: 4/1/2020
Status: Closed

Base: masterHead: explicit-path-separators


📝 Commits (2)

  • 85ffe28 use filepath when talking about the local fs, path for docker linux
  • 3dd75b5 just an obnoxious amount of path normalization

📊 Changes

5 files changed (+32 additions, -25 deletions)

View changed files

📝 Makefile (+5 -2)
📝 pkg/common/file.go (+3 -6)
📝 pkg/container/docker_run.go (+12 -9)
📝 pkg/runner/run_context.go (+4 -3)
📝 pkg/runner/step_context.go (+8 -5)

📄 Description

Updates path concatenation/usage to leverage filepath.Separator (often through filepath.Join) when referencing the host OS, but explicitly using / (often through path.Join) when referencing paths in docker containers/mounts.

Update: In addition to the above, there is also a healthy amount of path normalization so that Windows paths can be compared to their Docker counterparts. This should still be cross-os friendly as well.

In theory, this should work bi-directional including when using Windows containers, as Windows is very lax with this, but I don't really have the time to test it.

Addresses #145 and possibly a chain of others related to it.

Additionally adds a go-install to make as /usr/local/bin not available, or accessible in Git Bash. There's plenty of other ways of doing this, but this met my needs.

Please let me know if I need to update anything to meet contribution guidelines I didn't follow, or changes you'd like before merging.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/nektos/act/pull/180 **Author:** [@syntaqx](https://github.com/syntaqx) **Created:** 4/1/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `explicit-path-separators` --- ### 📝 Commits (2) - [`85ffe28`](https://github.com/nektos/act/commit/85ffe281574185a716d2d2ba09db6e07ceca94b3) use filepath when talking about the local fs, path for docker linux - [`3dd75b5`](https://github.com/nektos/act/commit/3dd75b5826b7901888b79f16c3be262196d70056) just an obnoxious amount of path normalization ### 📊 Changes **5 files changed** (+32 additions, -25 deletions) <details> <summary>View changed files</summary> 📝 `Makefile` (+5 -2) 📝 `pkg/common/file.go` (+3 -6) 📝 `pkg/container/docker_run.go` (+12 -9) 📝 `pkg/runner/run_context.go` (+4 -3) 📝 `pkg/runner/step_context.go` (+8 -5) </details> ### 📄 Description Updates path concatenation/usage to leverage `filepath.Separator` (often through `filepath.Join`) when referencing the host OS, but explicitly using `/` (often through `path.Join`) when referencing paths in docker containers/mounts. __Update:__ In addition to the above, there is also a healthy amount of path normalization so that Windows paths can be compared to their Docker counterparts. This should still be cross-os friendly as well. In theory, this should work bi-directional including when using Windows containers, as Windows is very lax with this, but I don't really have the time to test it. Addresses #145 and possibly a chain of others related to it. > Additionally adds a `go-install` to make as `/usr/local/bin` not available, or accessible in Git Bash. There's plenty of other ways of doing this, but this met my needs. Please let me know if I need to update anything to meet contribution guidelines I didn't follow, or changes you'd like before merging. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-01 21:50:55 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#1376
No description provided.