From f59a93ac2795e939fec23673b02f189eeaa5e1af Mon Sep 17 00:00:00 2001 From: Dima Date: Wed, 18 Aug 2021 11:49:53 +0300 Subject: [PATCH] filter non-aqua files (#246) --- cli/src/main/scala/aqua/files/AquaFilesIO.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/src/main/scala/aqua/files/AquaFilesIO.scala b/cli/src/main/scala/aqua/files/AquaFilesIO.scala index 4a49ab0c..d40d9a6b 100644 --- a/cli/src/main/scala/aqua/files/AquaFilesIO.scala +++ b/cli/src/main/scala/aqua/files/AquaFilesIO.scala @@ -107,7 +107,8 @@ class AquaFilesIO[F[_]: Files: Concurrent] extends AquaIO[F] { } else { Files[F].isDirectory(folder).flatMap { isDir => if (isDir) { - Files[F].list(folder).compile.toList.map(Right(_)) + Files[F].list(folder).evalFilter(p => if (p.extName == ".aqua") true.pure[F] else Files[F].isDirectory(p)) + .compile.toList.map(Right(_)) } else { Right(folder :: Nil).pure[F] }