File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
plugins/hls-fourmolu-plugin/src/Ide/Plugin Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,8 @@ import Ormolu
32
32
import System.Exit
33
33
import System.FilePath
34
34
import System.IO (stderr )
35
- import System.Process.Text (readProcessWithExitCode )
35
+ import System.Process.Run (proc , cwd )
36
+ import System.Process.Text (readCreateProcessWithExitCode )
36
37
37
38
descriptor :: PluginId -> PluginDescriptor IdeState
38
39
descriptor plId =
@@ -60,15 +61,15 @@ provider plId ideState typ contents fp fo = withIndefiniteProgress title Cancell
60
61
. try @ IOException
61
62
$ do
62
63
(exitCode, out, err) <-
63
- readProcessWithExitCode
64
- " fourmolu"
65
- ( [" -d" ]
66
- <> catMaybes
67
- [ (" --start-line=" <> ) . show <$> regionStartLine region
68
- , (" --end-line=" <> ) . show <$> regionEndLine region
69
- ]
70
- <> map (" -o" <> ) fileOpts
71
- )
64
+ readCreateProcessWithExitCode
65
+ ( proc " fourmolu" $
66
+ [" -d" ]
67
+ <> catMaybes
68
+ [ (" --start-line=" <> ) . show <$> regionStartLine region
69
+ , (" --end-line=" <> ) . show <$> regionEndLine region
70
+ ]
71
+ <> map (" -o" <> ) fileOpts
72
+ ){cwd = Just fp'}
72
73
contents
73
74
T. hPutStrLn stderr err
74
75
case exitCode of
You can’t perform that action at this time.
0 commit comments