Skip to content

How to iterate over classpath or how to unwrap T? #1782

Answered by lefou
Sailsman63 asked this question in Q&A
Discussion options

You must be logged in to vote
def copyToLib(): Command[Unit] = T.command {
  runClasspath()
    .map(_.path) // the path
    .filter(p => os.exists(p) && os.isFile(p)) // only existing files
    .foreach(p => os.copy.over(p, millSourcePath / "lib" / p.last)) // copy files flat into lib/
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Sailsman63
Comment options

Answer selected by Sailsman63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants