add warning when no input files are specified

This commit is contained in:
Zachary Snow 2021-03-29 11:16:53 -04:00
parent c6dbdd09ca
commit 5ac7a79f8b
1 changed files with 2 additions and 0 deletions

View File

@ -60,6 +60,8 @@ rewritePath path = do
(base, end) = splitAt (length path - length ext) path
writeOutput :: Write -> [FilePath] -> [AST] -> IO ()
writeOutput _ [] [] =
hPutStrLn stderr "Warning: No input files specified (try `sv2v --help`)"
writeOutput Stdout _ asts =
hPrint stdout $ concat asts
writeOutput Adjacent inPaths asts = do