atomist-attic / artifact-source

ArtifactSource abstraction for source code
GNU General Public License v3.0
2 stars 3 forks source link

Windows cannot handle certain characters in file path #18

Closed Lawouach closed 7 years ago

Lawouach commented 7 years ago

The following test fails on Windows:

should handle filtering .git and target from artifact-source *** FAILED ***
  java.nio.file.InvalidPathException: Illegal char <*> at index 43: C:\Users\sylvain\Documents\artifact-source\*.class
  at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
  at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
  at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
  at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
  at java.nio.file.Paths.get(Paths.java:84)
  at com.atomist.source.filter.AbstractPatternFileFilter$$anonfun$getPatterns$3.apply(AbstractPatternFileFilter.scala:65)
  at com.atomist.source.filter.AbstractPatternFileFilter$$anonfun$getPatterns$3.apply(AbstractPatternFileFilter.scala:65)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
  at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
  ...

the reason is that * is not an allowed character on Windows and thus Paths.get(...) fails in getPatterns.

alankstewart commented 7 years ago

Should be fixed in 0.14.2

alankstewart commented 7 years ago

Had to release 0.14.3 to remove spring-core dependency