Skip to content

Commit 5399602

Browse files
committed
default to cabal if stack.yaml not found
1 parent a1fa2b9 commit 5399602

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/Main.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ main = do
1818
sOrC =
1919
if | any ((".stack-work" ==) . takeFileName) files -> stackHieYaml
2020
| any (("dist-newstyle" ==) . takeFileName) files -> cabalHieYaml
21-
| otherwise -> stackHieYaml
21+
| any (("stack.yaml" ==) . takeFileName) files -> stackHieYaml
22+
| otherwise -> cabalHieYaml
2223
when (null path) $ error "No .cabal file found!\n You may need to run stack build."
2324
file <- T.readFile $ head path
2425
case parseOnly parsePackage file of

0 commit comments

Comments
 (0)