git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Merge pull request #1811 from purescript/1796

Fix #1796, don't print to stderr when using json errors

commit3eef41d5a70245366e6ea266c0c5098c309bfc3a authorPhil Freeman <paf31@cantab.net> dateSat 9 Jan 2016, 15:25 (11 years ago) parentee524b22dbb329
1 file changed+3−3
psc/Main.hs+3−3
psc/Main.hs+3−3
@@ -76,13 +76,13 @@ printWarningsAndErrors verbose True warnings errors = do
7676
7777compile :: PSCMakeOptions -> IO ()
7878compile PSCMakeOptions{..} = do
79− input <- globWarningOnMisses warnFileTypeNotFound pscmInput
80− when (null input) $ do
79+ input <- globWarningOnMisses (unless pscmJSONErrors . warnFileTypeNotFound) pscmInput
80+ when (null input && not pscmJSONErrors) $ do
8181 hPutStrLn stderr "psc: No input files."
8282 exitFailure
8383 let (jsFiles, pursFiles) = partition (isSuffixOf ".js") input
8484 moduleFiles <- readInput (InputOptions pursFiles)
85− inputForeign <- globWarningOnMisses warnFileTypeNotFound pscmForeignInput
85+ inputForeign <- globWarningOnMisses (unless pscmJSONErrors . warnFileTypeNotFound) pscmForeignInput
8686 foreignFiles <- forM (inputForeign ++ jsFiles) (\inFile -> (inFile,) <$> readUTF8File inFile)
8787 (makeErrors, makeWarnings) <- runMake pscmOpts $ do
8888 (ms, foreigns) <- parseInputs moduleFiles foreignFiles