Fix --file
option (#1004)
The `--file` option was essentially broken since it passed in the file path instead of the directory, meaning that transitive imports would not be computed correctly (they'd be off by one path component).
This commit is contained in:
parent
154d1c52cf
commit
53f5fa158e
|
@ -70,6 +70,7 @@ import qualified Options.Applicative
|
|||
import qualified Paths_dhall as Meta
|
||||
import qualified System.Console.ANSI
|
||||
import qualified System.IO
|
||||
import qualified System.FilePath
|
||||
import qualified Text.Dot
|
||||
import qualified Data.Map
|
||||
|
||||
|
@ -299,7 +300,7 @@ command (Options {..}) = do
|
|||
where
|
||||
file = case maybeFile of
|
||||
Just "-" -> "."
|
||||
Just f -> f
|
||||
Just f -> System.FilePath.takeDirectory f
|
||||
Nothing -> "."
|
||||
|
||||
let handle =
|
||||
|
|
Loading…
Reference in New Issue
Block a user