fix error message in simple sql parser when not parsing from file
This commit is contained in:
parent
4c8f612f56
commit
206982cd0a
|
@ -59,8 +59,8 @@ indent: parse then pretty print sql
|
||||||
> getInput :: [String] -> IO (FilePath,String)
|
> getInput :: [String] -> IO (FilePath,String)
|
||||||
> getInput as =
|
> getInput as =
|
||||||
> case as of
|
> case as of
|
||||||
> ["-"] -> ("-",) <$> getContents
|
> ["-"] -> ("",) <$> getContents
|
||||||
> ("-c":as') -> return ("-", unwords as')
|
> ("-c":as') -> return ("", unwords as')
|
||||||
> [filename] -> (filename,) <$> readFile filename
|
> [filename] -> (filename,) <$> readFile filename
|
||||||
> _ -> showHelp (Just "arguments not recognised") >> error ""
|
> _ -> showHelp (Just "arguments not recognised") >> error ""
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue