File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
plugins/hls-fourmolu-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import System.Exit
3838import System.FilePath
3939import System.Process.Run (cwd , proc )
4040import System.Process.Text (readCreateProcessWithExitCode )
41+ import Text.Read (readMaybe )
4142
4243descriptor :: Recorder (WithPriority LogEvent ) -> PluginId -> PluginDescriptor IdeState
4344descriptor recorder plId =
@@ -69,10 +70,10 @@ provider recorder plId ideState typ contents fp fo = withIndefiniteProgress titl
6970 let version = do
7071 guard $ exitCode == ExitSuccess
7172 " fourmolu" : v : _ <- pure $ T. words out
72- pure $ T. splitOn " ." v
73+ traverse (readMaybe @ Int . T. unpack) $ T. splitOn " ." v
7374 case version of
7475 Just v -> pure CLIVersionInfo
75- { noCabal = v >= [" 0 " , " 7 " ]
76+ { noCabal = v >= [0 , 7 ]
7677 }
7778 Nothing -> do
7879 logWith recorder Warning $ NoVersion out
You can’t perform that action at this time.
0 commit comments