Skip to content

Commit 07c5e11

Browse files
committed
FL0084
1 parent ff5189a commit 07c5e11

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

src/FSharpLint.Client/FSharpLintToolLocator.fs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -145,13 +145,13 @@ let private fsharpLintVersionOnPath () : (FSharpLintExecutableFile * FSharpLintV
145145

146146
fsharpLintExecutableOnPathOpt
147147
|> Option.bind (fun fsharpLintExecutablePath ->
148-
let processStart = ProcessStartInfo(File.Unwrap fsharpLintExecutablePath)
149-
processStart.Arguments <- "--version"
150-
processStart.RedirectStandardOutput <- true
151-
processStart.CreateNoWindow <- true
152-
processStart.RedirectStandardOutput <- true
153-
processStart.RedirectStandardError <- true
154-
processStart.UseShellExecute <- false
148+
let processStart = ProcessStartInfo(
149+
FileName = File.Unwrap fsharpLintExecutablePath,
150+
Arguments = "--version",
151+
CreateNoWindow = true,
152+
RedirectStandardOutput = true,
153+
RedirectStandardError = true,
154+
UseShellExecute = false)
155155

156156
match startProcess processStart with
157157
| Ok p ->
@@ -196,24 +196,24 @@ let createFor (startInfo: FSharpLintToolStartInfo) : Result<RunningFSharpLintToo
196196
let processStart =
197197
match startInfo with
198198
| FSharpLintToolStartInfo.LocalTool(workingDirectory: Folder) ->
199-
let ps = ProcessStartInfo("dotnet")
200-
ps.WorkingDirectory <- Folder.unwrap workingDirectory
201-
ps.Arguments <- $"{fsharpLintToolName} --daemon"
202-
ps
199+
ProcessStartInfo(
200+
FileName = "dotnet",
201+
WorkingDirectory = Folder.unwrap workingDirectory,
202+
Arguments = $"{fsharpLintToolName} --daemon")
203203
| FSharpLintToolStartInfo.GlobalTool ->
204204
let userProfile = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)
205205

206206
let fsharpLintExecutable =
207207
let fileName = if isWindows then $"{fsharpLintToolName}.exe" else fsharpLintToolName
208208
Path.Combine(userProfile, ".dotnet", "tools", fileName)
209209

210-
let ps = ProcessStartInfo(fsharpLintExecutable)
211-
ps.Arguments <- "--daemon"
212-
ps
210+
ProcessStartInfo(
211+
FileName = fsharpLintExecutable,
212+
Arguments = "--daemon")
213213
| FSharpLintToolStartInfo.ToolOnPath(FSharpLintExecutableFile executableFile) ->
214-
let ps = ProcessStartInfo(File.Unwrap executableFile)
215-
ps.Arguments <- "--daemon"
216-
ps
214+
ProcessStartInfo(
215+
FileName = File.Unwrap executableFile,
216+
Arguments = "--daemon")
217217

218218
processStart.UseShellExecute <- false
219219
processStart.RedirectStandardInput <- true

0 commit comments

Comments
 (0)