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