-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support slashes in file sync glob patterns on windows #1280
Support slashes in file sync glob patterns on windows #1280
Conversation
096d43c
to
e8d3d39
Compare
Codecov Report
@@ Coverage Diff @@
## master #1280 +/- ##
==========================================
- Coverage 44.3% 44.24% -0.06%
==========================================
Files 104 104
Lines 4623 4629 +6
==========================================
Hits 2048 2048
- Misses 2366 2372 +6
Partials 209 209
Continue to review full report at Codecov.
|
e8d3d39
to
5ab1f98
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the test. did you find an issue in Go for filepath.Match
not working on windows? maybe you should file one :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this became a legit PR as it failed without the FromSlashes
: https://ci.appveyor.com/project/r2d4/skaffold/builds/20334943
Please rename it to "support slashes in sync glob patterns on windows" + the little nits and we're good to go! Thank you!
pkg/skaffold/sync/sync_test.go
Outdated
@@ -210,6 +210,32 @@ func TestNewSyncItem(t *testing.T) { | |||
}, | |||
}, | |||
}, | |||
{ | |||
description: "test filepaths", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: "test filepaths", | |
description: "slashes in glob pattern", |
pkg/skaffold/sync/sync_test.go
Outdated
}, | ||
}, | ||
evt: watch.Events{ | ||
Added: []string{filepath.Join("node", "node/node.js")}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added: []string{filepath.Join("node", "node/node.js")}, | |
Added: []string{filepath.Join("folder1", "folder2/node.js")}, |
just to make it a bit more understandable. too many nodes :)
#1266 failed on appveyor because the new library couldn't process windows paths.
filepath.Match also doesn't handle paths for windows itself, so I applied filepath.FromSlash() to each pattern before matching.