Skip to content

Commit 7a9d718

Browse files
committed
Set pathsAffectingAllModules via OS specific path
This protects against some users specifying Windows separators and some specifying Unix-like separators.
1 parent efc7a42 commit 7a9d718

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector/AffectedModuleConfiguration.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.dropbox.affectedmoduledetector
22

3+
import com.dropbox.affectedmoduledetector.util.toOsSpecificPath
34
import java.io.File
45

56
class AffectedModuleConfiguration {
@@ -66,7 +67,8 @@ class AffectedModuleConfiguration {
6667
requireNotNull(baseDir) {
6768
"baseDir must be set to use pathsAffectingAllModules"
6869
}
69-
field = value
70+
// Protect against users specifying the wrong path separator for their OS.
71+
field = value.map { it.toOsSpecificPath() }.toSet()
7072
}
7173
get() {
7274
field.forEach { path ->

0 commit comments

Comments
 (0)